(9)
Write a C++ function that intakes two arguments ::
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
0
Answer:
void fun(char a,int n=2)
{
for(int i=0;i<n;i++)
{ cout<<a<<endl;
}
}
void main()
{
fun('A',4); getch();
}
(Plz Mark it as Brainliest
Follow Me)
Similar questions