Assignment: #sort3numbers |
Due: 10/14/02018 |
Points: 5 |

This program loops nine times.

Do the following for each loop cycle:

prompt the user to enter three space delimited integers print the three numbers in ascending order (smallest-to-largest) add the entered numbers to an accumulator variableThe body of the loop can contain only two

coutstatements: one to print the prompt and one to print the sorted numbers.This program cannot use any type of array.

Prior to exiting the program print the sum of the numbers entered and the average of the numbers entered.

Example inputs/outputs.

enter three integers (n n n): 1 2 3 1 2 3 sorted is 1 2 3 enter three integers (n n n): 1 3 2 1 3 2 sorted is 1 2 3 enter three integers (n n n): 2 1 3 2 1 3 sorted is 1 2 3 enter three integers (n n n): 2 3 1 2 3 1 sorted is 1 2 3 enter three integers (n n n): 3 1 2 3 1 2 sorted is 1 2 3 enter three integers (n n n): 3 2 1 3 2 1 sorted is 1 2 3 enter three integers (n n n): 5 5 2 5 5 2 sorted is 2 5 5 enter three integers (n n n): 4 3 4 4 3 4 sorted is 3 4 4 enter three integers (n n n): 3 6 6 3 6 6 sorted is 3 6 6 sum of all numbers entered: 74 average of the numbers entered: 2.7407408