Hello Guys,
Today I am going to tell you how to find average of three numbers in c program. By using this program you can find average of three numbers in c program.
How To Find Average Of Three Numbers In C Program |
#include<stdio.h>
main( )
{
int a,b,c,sum,avg;
a=10;
b=5;
c=20;
sum = a+b+c;
avg = sum / 3;
printf(“The average is %d\n”, avg);
}
OUTPUT
The average is 8.
Comments
Post a Comment