Average with while loop
Use the while loop to collect input from user and calculate the average number out of it in 2 decimal
, the program will keep collect input from user until the user type "n".
Example Outputs
Enter number here (or n to quit): 3.5
Enter number here (or n to quit): 6.45
Enter number here (or n to quit): 8.74
Enter number here (or n to quit): n
Average number is 6.23
Enter number here (or n to quit): 100
Enter number here (or n to quit): 111
Enter number here (or n to quit): 222
Enter number here (or n to quit): 333
Enter number here (or n to quit): 444
Enter number here (or n to quit): 555
Enter number here (or n to quit): n
Average number is 294.17