Hey,
I am writing a do-while loop program that will ask a user for a number then print "I love programming" that number of times. For example, if the user types in 3, then it would read "I love programming"
"I love programming"
"I love programming".
So far this is all I have.
I really am dumb-struck about what to do for the part where it repeats the words the certain amount of times.
Help on what I should do to make it repeat enough would be greatly appreciated!
Thanks, I sure hope someone can help me out!Code:#include <iostream> #include <string> using namespace std; int main() { int number; char x; x=1; cout << "Enter a number:" << endl; do { cin >> number; //what am i going to do here to make sure it prints "I love programming enough times??? } while (x == 1); return 0; }