//C Program for Average of 4 Number
#include<stdio.h>
#include<conio.h>
void main()
{
float a,b,c,d,avg;
clrscr();
printf("\nEnter the 4 nos.");
scanf("%f%f%f%f",&a,&b,&c,&d);
avg=(a+b+c+d)/4;
printf("Averageis=%f",avg);
getch();
}
Hope you liked my posts, give comments if you have any doubts.. :)#include<stdio.h>
#include<conio.h>
void main()
{
float a,b,c,d,avg;
clrscr();
printf("\nEnter the 4 nos.");
scanf("%f%f%f%f",&a,&b,&c,&d);
avg=(a+b+c+d)/4;
printf("Averageis=%f",avg);
getch();
}
0 comments:
Post a Comment