Computer Science, asked by GautamRaaz, 1 year ago

write a c++ program that intake two argument a character and an integer and prints the character given number of times .if however the integer is missing ,the function prints the character twice

Answers

Answered by BBloggsbott
4
//function definition...
void printer(char ch, int n=2) //2 is the default
{
for(int i=0; i<n; i++)
cout<<ch;
}
Similar questions