PROGRAM 6: Three Zero Game Write an HLA program that reads a number. Then by subtracting off a three and tens, determine if that value ends in a zero or a three. Three such numbers in a row wins the game! Shown below are sample program dialogues to help you build your program. Gimme a number: 20 It ends in zero! Keep going... Gimme a number: 53 It ends in three! Keep going... Gimme a number: 41 Sorry Charlie! You lose the game!
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
PROGRAM 6: Three Zero Game
Write an HLA program that reads a number. Then by subtracting off a three and tens, determine if that value ends in a zero or a three. Three such numbers in a row wins the game!
Shown below are sample program dialogues to help you build your program.
Gimme a number: 20
It ends in zero!
Keep going...
Gimme a number: 53
It ends in three!
Keep going...
Gimme a number: 41
Sorry Charlie! You lose the game!
Gimme a number: 50
It ends in zero!
Keep going...
Gimme a number: 23
It ends in three!
Keep going...
Gimme a number: 70
It ends in zero!
You Win The Game!
Gimme a number: 51
Sorry Charlie! You lose The Game!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps