C++ programing

I need to write a program that asks the user for two starting numbres,
and then display the sequence and the number of step of taken. the program
output should look similar to the following:

Enter first number:1
Enter second number: 8

the numbers requiered 12 steps.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What are the steps?
The rule seems to be that two consecutive numbers are added and the least significant digit of the sum is then used as the next digit in the output.

1 + 8 = 9
8 + 9 = (1)7
9 + 7 = (1)6
7 + 6 = (1)3 etc.

The process seems to stop when the new digit is the same as the second number entered at start. Am I right?

Ciao, Mike
you can use the same principle as in your other question. use the % (ex.: 7453%10=3) operator to find the least segnificant digit of the resault of the additions and then compare it to what ever you need to compare it to.

tell me if you need more help,
Arnon David.
Hi Arnond, how you doing? Thanks for help me.
I want to give you your grade but I don't konw how to do it.
I'm teaching myselft with c++ because I have to take it next semeter, but I think it is too hard for me. But anyway I want to try it.
Please tell me how can I give you your grade por help me.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
you should login as  "glennys" and reject the answer you've posted as "glennysg" and then ask me to post an asnwer for this question or, if you can, click on "accept comment" in my comment (if it's available).

Arnon David.

p.s., don't give up. learning a new programming language is a hard thing and only by doing exersices and experiments you can learn.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.