Program for find average of five numbers
Program for find average of five numbers
#include <stdio. h>
#include <conio. h>
int main()
{
int a, b, c, d, e;
int sum=0;
float avg;
clrscr();
Printf ("enter the five number ");
scanf ("%d%d%d%d%d",&a, &b, &c, &d, &e) ;
sum=a+b+c+d+e;
avg=sum/5;
printf ("sum = %d\n",sum);
printf ("average = %f",avg);
return 0;
getch();
getch();
}
Comments
Post a Comment