#include<iostream>
#include<string>
using namespace std;
void printString(string stringIn,int n){
for(int i=0;i<n;i++){
cout<<stringIn<<"\n";
}
}
int main()
{
string stringIn;
int n;
cout<<"Enter string: ";
cin>>stringIn;
cout<<"Enter n: ";
cin>>n;
printString(stringIn,n);
cin>>n;
return 0;
}
Comments
Leave a comment