C++ : Write a program using function to print line of 50 asterisk.


#include<iostream>
#include<conio.h>

using namespace std;

void display(char ch);

int main()
{
display('*');
getch();
return(0);
}

void display(char ch)
{
for(int i=1;i<=50;i++)
{
cout<<ch;
}
}

No comments:

Post a Comment