Write a program that gets the user to enter an integer. It should keep doing this until they enter a value greater than 0.
The program should then tell the user if they have entered a perfectly bouncy number,
a bouncy number or a number that is not bouncy.
A **bouncy number** is a number that is not an increasing number and not a
decreasing number.
An **increasing number** is one where each digit is greater than or equal to the
previous digit in the number.
A **decreasing number** is one where each digit is less than or equal to the previous
digit in the number.
A **perfectly bouncy number** is a bouncy number in which the number of digits that
are followed by a larger digit is equal to the number of digits that are followed by a
smaller digit.
**Examples**
- 13578 is not a bouncy number because it is an increasing number.
- 973 is not a bouncy number because it is a decreasing number.
- 98657 is a bouncy number.
- 1111 is not a bouncy number because it is both an increasing number and a decreasing number.
- 13421 is a perfectly bouncy number as exactly two digits are followed by a larger digit and there are also exactly two digits followed by a smaller digit.
- 1829361 is a perfectly bouncy number as exactly three digits are followed by a larger digit and there are also exactly three digits followed by a smaller digit.
- 13333331 is a perfectly bouncy number as there is exactly one digit followed by a larger digit and also exactly one digit followed by a smaller digit.
**Evidence that you need to provide**
Include the following evidence in your Electronic Answer Document.
**0 7** **.** **1** Your PROGRAM SOURCE CODE
**[12 marks]**
**0 7** **.** **2** SCREEN CAPTURE(S) showing the results of testing the program by entering the integers:
- –3
- 14982
- 1234
You will need to execute your program more than once to test all of the integers.
**[1 mark]**