Write a program to calculate of average of five numbers.
#include<stdio.h>
#include<conio.h>
main()
{
clrscr();
int a,b,d,c,e,sum;
float avg;
printf("Enter marks of english- ");
scanf("%d",&a);
printf("Enter marks of Bangla- ");
scanf("%d",&b);
printf("Enter marks of Math- ");
scanf("d%",&c);
printf("Enter marks o Physics- ");
scanf("d%",&d);
printf("Enter marks of Chemistry- ");
scanf("d%",&e);
sum=a+b+c+d+e;
printf("%d",sum);
avg=sum/5;
printf("%f",avg);
getch();
}
#include<conio.h>
main()
{
clrscr();
int a,b,d,c,e,sum;
float avg;
printf("Enter marks of english- ");
scanf("%d",&a);
printf("Enter marks of Bangla- ");
scanf("%d",&b);
printf("Enter marks of Math- ");
scanf("d%",&c);
printf("Enter marks o Physics- ");
scanf("d%",&d);
printf("Enter marks of Chemistry- ");
scanf("d%",&e);
sum=a+b+c+d+e;
printf("%d",sum);
avg=sum/5;
printf("%f",avg);
getch();
}