Wednesday, 24 July 2013

C-Program to Find AVERAGE of Five Numbers

#include<stdio.h>
main ()
{
int a,b,c,d,e,sum=0;
float avg;
printf("Enter the five numbers\t");
scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
sum=a+b+c+d+e;
avg=(float)sum/5;
printf("Average of the numbers %d %d %d %d %d is \t%f\n",a,b,c,d,e,avg);
}



sakoncepts.blogspot.com
output

No comments:

Post a Comment