Computer Science, asked by viveksinghal4191, 7 months ago

Write an algorithm to find the average of two numbers in computer science

Answers

Answered by Anonymous
7

Explanation:

Flowchart and algorithm

Write an algorithm for finding the average of two numbers and also draw a flowchart.

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.

Similar questions