Computer Science, asked by rachnasetia5239, 1 month ago

Write an algorithm for finding the sum, subtract, product and average of five inputting numbers

Answers

Answered by Anonymous
2

\bf\huge\underline{Answer}:-

Algorithm: The difference steps are:

Step 1: Start

Step 2: Accept five nos n1, n2, n3, n4, n5

Step 4: Find sum = n1 + n2 + n3 + n4 + n5

Step 5: Find subtract = n1 - n2 - n3 - n4 - n5

Step 6: Find product = n1 * n2 * n3 * n4 * n5

Step 7: Find average = sum/5

Step 8: Display sum, subtract, product and average.

Step 9: Stop

Knowledge Bytes :

  • An algorithm is a set of step by step instructions to perform a specific problem.

Some instructions :

  • Begin an algorithm with the keyword 'Start'.
  • Write each instruction in a separate line.
  • Each instruction should be precise and clear.
  • Each instruction should be executed in a finite time.
  • After execution, the instructions should give the desired result.
  • An algorithm should contain a finite number of steps.
Similar questions