Write an algorithm to determine the average of any five(5) numbers and display the below after: the sum, the product and the average.
Algorithm:
Step 1 Create variable called number
Step 2 Create variable called sum=0
Step 3 Create variable called average
Step 4 Create variable called product=1
Step 5 for i := 1 to 5 Step 1 do
Step 6 Get number from the user
Step 7 sum := sum+number
Step 8 product:=product*number
Step 9 average := sum/5
Step 10 Display sum
Step 11 Display product
Step 12 Display average
Comments
Leave a comment