Write a program that reads numbers until a user enters . Once is entered, stop reading the input and ignore the numbers entered afterward (numbers entered before , regardless of whether they are greater or less than , should be counted), print out how many numbers have been entered before , their total sum, and average (round the resulting average this way: round(average)). Do NOT include in your calculations. Print each resulting value on a new line in the following order:
- how many numbers were given until 55
- their sum
- their average: sum / the number of given numbers
Tip: There are several ways to solve the problem, feel free to choose the one you like. However, the easiest one would be to use two variables – one to count incoming numbers (assign it to 0 and increase its value each time the incoming number is not 55) and one to sum them up on the fly (once again, start with 0 and add each incoming number not equal to 55 to it). This way, you won't need any additional tools.