cout<<"Enter Number Of Times To Repeat It:"<<endl;
cin>>nin;
repchar(chin,nin);
return 0;
}
void repchar(char ch, int n){
for(int j=0;j<n;j++)
{
cout<<ch;
cout<<endl;
}
}
Output
Description
In this program, we are just getting input from the user and and passing the values by variable names which we have just declared and defined in the function.
Hello, I'm Mutabar Shah, an IT professional passionate about writing on programming and new tech trends. With six years of experience, I take pride in delivering top-quality services regarding web and app services to my clients and meeting their specific requirements.
No comments: