Question: PROGRAM 6 : Crazy 8 s Game Write a program that reads a set of three different numbers. Then by subtracting off tens, determine if

PROGRAM 6: Crazy 8s Game
Write a program that reads a set of three different numbers. Then by subtracting off tens, determine if any of the values ends in an eight. Continue looping as long as one of the numbers in the set ends in eight. Three sets with a value ending in eight wins the game!
Shown below are sample program dialogues to help you build your program.
Gimme a number: 20
Gimme a number: 12
Gimme a number: 44
Sorry Charlie! You lose the game!
Gimme a number: 58
Gimme a number: 23
Gimme a number: 70
One of them ends in eight!
Gimme a number: 1
Gimme a number: 12
Gimma a number: 28
One of them ends in eight!
Gimme a number: 7
Gimme a number: 8
Gimme a number: 22
One of them ends in eight!
You Win The Game!
Gimme a number: 51
Gimme a number: 51
Gimme a number: 51
Sorry Charlie! You lose The Game!
(Hint: This program is pretty complex with many different conditions to keep track of. I would recommend you write it first in C or Visual Basic and then translate your lines of code, one-by-one, into a assembly statements, just like our good friend mr. compiler does)
(Hint: Since we don't really know how to do much math in Assembly yet, I am assuming you will loop down by subtracting ten to try to reach the value eight. If you hit exactly eight after taking off enough values of ten, you know you had an original value ending in eight. If you get to less than eight, you know the number did not end in eight.)
Use the reference in the images.
PROGRAM 6 : Crazy 8 s Game Write a program that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!