Computer Science, asked by favourtemiloluwa, 9 months ago

write an algorithm to find the average of five numbers

Answers

Answered by OnlyStudy21
7

Denote the five numbers as a, b, c, d and e. The average is: (a + b + c + d +e) ÷ 5.

Answered by niteshrajputs995
1

Answer:

Given below is the answer

Explanation:

Algorithm: Input: two numbers x and y Output: the average of x and y Step 1 : input x,y Step 2: sum=0,average=0 Step 3:sum = x + y Step 4:average = sum /2 Step 5: print average.

As opposed to using the normal recipe's printed directions, one would not follow them. In a similar vein, not all computer instructions written down are algorithms. Some instructions must meet the following requirements in order to qualify as an algorithm:

Unambiguous and Clear: The algorithm must be unambiguous and clear. Each of its actions must have a distinct meaning and be transparent from beginning to end.

Well-Defined Inputs: If an algorithm requests inputs, the inputs must meet certain criteria. It might or might not accept input.

Well-Defined Outputs: The algorithm must define precisely and precisely what output it will produce. It ought to generate at least one output.

The algorithm must be finite, that is, it should terminate after a finite time.

Feasible: The algorithm must be simple, generic, and practical, such that it can be executed with the available resources. It must not contain some future technology or anything.

Language Independent: The Algorithm designed must be language-independent, i.e. it must be just plain instructions that can be implemented in any language, and yet the output will be the same, as expected.

See more;

https://brainly.in/question/49689098

#SPJ3

Similar questions