how to write algorithm find the maximum,minimum,sum and average of 3 numbers

1. Start

2. Input three numbers: num1, num2, num3
3. Set max = num1
4. Set min = num1
5. Set sum = num1 + num2 + num3
6. Set avg = sum / 3
7. If num2 > max, set max = num2
8. If num3 > max, set max = num3
9. If num2 < min, set min = num2
10. If num3 < min, set min = num3
11. Output max, min, sum, and avg
12. End.

To write an algorithm to find the maximum, minimum, sum, and average of three numbers, follow these steps:

Step 1: Start
Step 2: Take three input numbers: num1, num2, num3
Step 3: Set max as the maximum of num1, num2, and num3
- If num1 > num2 and num1 > num3, then set max = num1
- If num2 > num1 and num2 > num3, then set max = num2
- If num3 > num1 and num3 > num2, then set max = num3
Step 4: Set min as the minimum of num1, num2, and num3
- If num1 < num2 and num1 < num3, then set min = num1
- If num2 < num1 and num2 < num3, then set min = num2
- If num3 < num1 and num3 < num2, then set min = num3
Step 5: Set sum as the sum of num1, num2, and num3
- sum = num1 + num2 + num3
Step 6: Set average as the average of num1, num2, and num3
- average = sum / 3
Step 7: Display the maximum, minimum, sum, and average
- Print "Maximum: " + max
- Print "Minimum: " + min
- Print "Sum: " + sum
- Print "Average: " + average
Step 8: Stop

This algorithm takes three input numbers, finds the maximum, minimum, sum, and average of the three numbers, and displays the results.