write an algorithm for total of any three marks and find the average of the same
Answers
Answer:
HEYA HERE IS THE ANSWER
Explanation:
ALGORITHM FOR TOTAL OF ANY THREE MARKS AND AVERAGE:
1. START THE PROGRAM
2. DECLARE 4 VARIABLES OF TYPE FLOAT
FLOAT M1,M2,M3,AVG;
3. INPUT VALUES FOR THE THREE MARKS FROM USER
4. DISPLAY MARKS(IF NEEDED)
5. CALCULATE AVERAGE USING THE FORMULA
AVG=(M1+M2+M3)/3
6. DISPLAY AVERAGE(IF NEEDED)
7. EXIT THE PROGRAM
NOTE:THE ONE CODE I HAVE USED FOR DECLARING VARIABLE IS FROM C++
YOU CAN APPLY THE ALGORITHM USING ANY LANGUAGE
PYTHON IS VERY EASY FOR SUCH PROGS
HOPE THIS HELPS
MARK ME BRAINLIEST
FOLLOW ME FOR MORE DOUBTS
Answer:
Explanation:
step 1: get the input of three real numbers and store in a,b,c
step 2: calculate sum <- a + b + c
step 3: calculate avg <- sum / 3
step 4: print sum and avg
Explanation:
#include <stdio.h>
main()
{
float a, b, c, sum, avg;
printf("\nEnter value of three numbers: ");
scanf("%f %f %f", &a, &b, &c);
sum = a + b + c;
avg = sum / 3;
printf("\nSum = %.2f", sum);
printf("\nAverage = %.2f", avg);
getch();
}