ProAnswers.org

Write a C program to find out the Average of three Real Numbers ?

#include
#include
void main()
{
float a,b,c,x;
clrcsr();
printf(“enter the three real numbers:
”);
scanf(“%f%f%f”,&a,&b,&c);
x=(a+b+c)/3;
printf(“average=%f
”,x);
getch();
}
Output:
enter the three real numbers:
3
4
5
average=4.000000