Source Code
/*C program to find the average of three numbers*/
#include<stdio.h>
int main()
{
float a,b,c,av=0;
printf("Enter any three numbers to find their average \n");//Enter 3 number
scanf("%f%f%f",&a,&b,&c);
av=(a+b+c)/3.0; //calculate average
printf("\n Average of three numbers is \t %f",av);//result store in variable av
return 0;
}
Output
0 comments:
Post a Comment