Sei sulla pagina 1di 1

WAP to print the mean of three float type numbers.

#include<stdio.h>
main()
{
float a,b,c,avg;
printf("Enter the value for a:");
scanf("%f", &a);
printf("Enter the value for b:");
scanf("%f", &b);
printf("Enter the value for c:");
scanf("%f", &c);
avg=(a+b+c)/3;
printf("The result is:%f\n",avg);
}

Potrebbero piacerti anche