Hello,
Im studying for my finals and one of the problems in my textbook asked me to write the code for this output..
http://i.imgur.com/z3z00nM.png
So I've been trying to write the code for this, and I can see that I need 2 loops- 1 for the # of lines, and 1 for the number of frames as well as to repeat asking questions for the number of frames.
This is what I have so far..
----------------------------------------------------------------------------------
#include <iostream>
#include <string>
#include <iomanip>
#include <Windows.h>
using namespace std;
void getAnimation(int);
int main()
{
system("cls");
string userName, animation;
getName(userName);
cout << "Hello" << userName << "." << endl;
getAnimation (animation);
return 0;
}
void getName(string& name)
{
cout << "Please enter your name" << endl;
getline(cin, name);
}
void getAnimation(string &animation)
{
int counter;
cout << "How many frames of animation would you like?" << endl;
cin >> animation;
counter = 0;
for (counter = 0; counter < (animation; counter++)
{
cout << "How many lines do you want in this frame?" << endl;
for ()
}
}
------------------------------------------------------------------------------'
I think I need a for loop inside a for loop so that I can run the 2 loops I mentioned above, but Im extremely stuck on how to write this out! I might have to write something like this in my final, so any help would be appreciated!!