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();
}

Comments

Popular posts from this blog

program for sorting array using selection sort technique || in c programming language

Program to calculate the sum of given number using array