Computer Science, asked by shrutidubey241984, 7 months ago

write an algorithm to print the average of three numbers.​

Answers

Answered by ipatelsiddh
1

Algorithm :

Step 1 : Start

Start 2 : Input num1, num2, num3

Start 3 : Calculate avg = (num1 + num2 + num3)/3)

Start 4 : Output avg

Start 5 : Stop

programme -

#include <stdio.h>

main()

{

int a, b, c, avg;

printf("\nEnter value of three numbers: ");

scanf("%i %i %i", &a, &b, &c);

avg = sum / 3;

printf("\nAverage = %.2i", avg);

getch();

}

Attachments:
Answered by srikarkk4911
0

Answer:

Explanation:

get the second number (e.g. 27) 3. get the third number (e.g. 100) 4. add the three numbers together to calculate the total (e.g. 159) 5. divide the total by 3 to calculate the average (e.g. 53) The study of algorithms is a very important part of computer/computing science

mark me as brainliest

Similar questions