91.1k views
5 votes
Write the definition of a function printDottedLine, which has no parameters and doesn't return anything. The function prints to standard output a single line (terminated by a new line character) consisting of 5 periods

1 Answer

4 votes

Answer:

The following are the code in the C++ Programming Language.

//define void type function

void printDottedLine() {

//print the dotted line

cout << "....."<< endl;

}

Step-by-step explanation:

The following are the description of the program.

In the above program that is written in the C++ Programming Language, define void data type function that is 'printDottedLine()' and no arguments are passed in its parameter. Then, print the dotted line inside the function with the pre-defined function 'endl' that every time breaks the line after print the dotted line when the function is called.

User Zerodf
by
3.1k points