Hello sonia123,
Welcome to the forum.
The code starts off like this and I do not know how to do the rest. |
If you are telling me this my first suggestion is to go back to your books. Or maybe take a look at:
http://www.cplusplus.com/doc/tutorial/functions/
You should also go over:
http://www.cplusplus.com/doc/tutorial/control/
In all the examples there is a main function which would be your next step in the program.
You may want to start with a greeting message and maybe what the program does. Followed by a prompt to ask the user how many plays they want.
You may want to call a function that generates the random numbers.
Just the first thoughts that came to mind. One point here is work on the program in small steps like the opening message and input. Once you have input and something to work with you can take the next step.
In your header files you will need to include <stdlib.h> for "rand()" and "srand()".
An A+ on the constant variable using capital letters.
I do not know where you picked up on the line
using namespace std;
, but consider this:
Try to avoid using
using namespace std;
in your programs it may seem easy now, but
WILL get you in trouble some day.
It is better to learn to qualify what is in the standard name space with "std::" and then to learn what is in the standard name space now while it is easy. And not all at once to try to keep a job.
What you are most likely to use for now is "std::cout", "std::cin" and "std::endl". About a week or so of typing this and you will not even notice that you are doing it.
Hope that helps,
Andy