#include<iostream>
using namespace std;


// Precondition: input a string
// Postcondition: print string to screen
void printOut(string x);

// Precondition: input a string
// Postcondition: print string to screen multiple times
void printOut(string x, int numRepeats);


int main()
{
 // Initialize variables
 string inWord;
 int numRepeats;

 // Obtain string to print, and print it once
 cout << "Enter string: " ;
 cin >> inWord;
 printOut(inWord);

 // Obtain number of times to repeat string, repeat string
 cout << "Enter number of repeats: ";
 cin >> numRepeats;
 printOut(inWord, numRepeats);

 return 0;
}


// Prints input string once
void printOut(string x)
{
 cout << x << endl;
 return;
}


// Prints input string multiple times
void printOut(string x, int numRepeats)
{
 for(int i=1; i<=numRepeats; i++)
  cout << x << endl;

 return;
}