HOW TO write algorithm and pseudocode

TO find the avrge,max min and sum of three number given by the user

Algorithm:

1. Start
2. Declare variables num1, num2, num3, sum, avg, max, min
3. Read values of num1, num2 and num3 from user
4. Initialize sum as num1 + num2 + num3
5. Calculate avg as sum/3
6. Set max as num1
7. If num2 > max, set max as num2
8. If num3 > max, set max as num3
9. Set min as num1
10. If num2 < min, set min as num2
11. If num3 < min, set min as num3
12. Print sum, avg, max and min
13. Stop

Pseudocode:

DECLARE num1, num2, num3, sum, avg, max, min
READ num1, num2, num3
SET sum = num1 + num2 + num3
SET avg = sum/3
SET max = num1
IF num2 > max THEN SET max = num2
IF num3 > max THEN SET max = num3
SET min = num1
IF num2 < min THEN SET min = num2
IF num3 < min THEN SET min = num3
PRINT "Sum=",sum
PRINT "Average=",avg
PRINT "Maximum=",max
PRINT "Minimum=",min

To write an algorithm and pseudocode to find the average, maximum, minimum, and sum of three numbers given by the user, you can follow these steps:

Algorithm:
1. Start the program.
2. Read the three numbers from the user.
3. Calculate the sum of the three numbers by adding them together.
4. Calculate the average by dividing the sum by 3.
5. Initialize a variable to store the maximum value and set it equal to the first number.
6. Check if the second number is greater than the maximum value. If true, update the maximum value.
7. Check if the third number is greater than the maximum value. If true, update the maximum value.
8. Initialize a variable to store the minimum value and set it equal to the first number.
9. Check if the second number is less than the minimum value. If true, update the minimum value.
10. Check if the third number is less than the minimum value. If true, update the minimum value.
11. Display the sum, average, maximum, and minimum values.
12. End the program.

Pseudocode:
```
1. Start the program.
2. Read num1, num2, num3 from the user.
3. sum = num1 + num2 + num3
4. average = sum / 3
5. max = num1
6. if num2 > max, set max = num2
7. if num3 > max, set max = num3
8. min = num1
9. if num2 < min, set min = num2
10. if num3 < min, set min = num3
11. Display "Sum:", sum
12. Display "Average:", average
13. Display "Maximum:", max
14. Display "Minimum:", min
15. End the program.
```