C Program that Display the average of three numbers - 6 Players blogs for technology

give us your feedback

People Online

Breaking

ads

Post Top Ad

Friday, May 31, 2019

C Program that Display the average of three numbers

#include <stdio.h>
#include <stdlib.h>

int main()
{
    float a,b,c,d;
printf("\n\t enter the first number = ");
scanf("%f",&a);
printf("\n\t enter the second number = ");
scanf("%f",&b);
printf("\n\t enter the third number = ");
scanf("%f",&c);
d=(a+b+c)/3;
printf("\n\t the average of three number is = %.2f",d);
    return 0;
}
   
THE OUTPUT
enter the first number = 5
enter the second number =5 
enter the third number = 5

the average of three numbers is = 5

No comments:

Post a Comment

ads1

Post Top Ad