Help please

I'm fairly new to coding and I have this project for class due soon and was wondering if i can get some examples or help with it. I know the math component of the problem, but cant put it into coding because I kind of forgot all about coding in c++. Thanks and cheers.

One paragraph in the program should describe the problem and solution design.

Each code block should be preceded with comments on what it does.

Important variables should have a comment about their usage.

Use at least three functions besides the main () function.

You will write a program that will give the following output:

===

This C++ program is written by <firstname lastname>.

This program simulates a game. Take a pen and paper and follow the instructions below:

1. Write any positive number on the paper.

2. Subtract the sum of the digits of this number from the number.

Now, if you tell me all but one digit (must be 1 though 9, excluding 0), I can figure out which one you did not tell me.

3. Enter in any order without spaces the digits except one of them.

The digit that you did not enter was: <answer>

Press M or m to play more and X or x to exit the program.

Have a nice day!
Have you ever written a program that can split a number into its individual base-10 digits? If not, now is a good time to do it. You'll need to know how to do this in order to do your assignment.
Yeah i dont think ive written something like that so ill need to brush up on that as well. Thanks for the heads up buddy
Topic archived. No new replies allowed.