Write and algorithm and a corresponding flowchart to:
find the greater of two numbers.
find the average of three numbers
Answers
Write and algorithm and a corresponding flowchart to:-
Find the greater of two numbers.
Algorithm:-
Step 1 : Start
Step 2 : Take two numbers
Step 3 : Find the greatest number
Step 4 : Put > or < between the two numbers
Step 5 : Print the result
Step 6 : Stop
Flowchart:-
Start
⬇️
Take two numbers
⬇️
Find the greatest number
⬇️
Put > or < between the two numbers
⬇️
Print the result
⬇️
Stop
Find the average of three numbers.
Algorithm:-
Step 1 : Start
Step 2 : Take three numbers N1, N2 and N3
Step 3 : Add the three numbers and store the result as Average
Step 4 : Divide the sum by 3 and store the result as Average
Step 5 : Print the value of Average
Step 6 : Stop
Flowchart:-
Start
⬇️
Take three numbers N1, N2 and N3
⬇️
Add the three numbers and store the result as Average
⬇️
Divide the sum by 3 and store the result as Average
⬇️
Print the value of Average
⬇️
Stop