Archive for the ‘CODE’ Category

Program for Average of four number

August 29, 2010

//Average of 4 no.
#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…:)

(more…)