Ask Question

Write the definition of a function dashedline, with one parameter, an int. if the parameter is negative or zero, the function does nothing. otherwise it prints a complete line terminated by a new line character to standard output consisting of dashes (hyphens with the parameter 's value determining the number of dashes. the function returns nothing.

+3
Answers (1)
  1. 23 September, 00:19
    0
    Static void DashedLine (int n) { if (n>1) Console. WriteLine (new String ('-', n)); }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write the definition of a function dashedline, with one parameter, an int. if the parameter is negative or zero, the function does nothing. ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers