I am having some trouble with the below code. I can't think of anyway that would allow me to make the "word" appear the same amount of times as the number you input in and the "sep" not being at the end of the output. Also, you can't change the code outside of the "Enter your code" area. Any advice or hints would be more then appreciated, since this is driving me crazy right now.
#include <iostream>
#include <string>
using namespace std;
int main()
{
//Example: "And" "X" "2" = AndXAnd
// "A" "B" "5" = ABABABABA
cout << "Enter a word, then a separator, and integer :";
string word, sep, count;
cin >> word >> sep >> count;
string str = "";
//Enter code below
//Enter code above
cout << "The word " << word << " and " <<
sep << " becomes: " << str << endl;