Program to accept the marks of three subjects and print total marks and average marks

12:48 AM
#include
#include
void main()
{
int m1,m2,m3,total,avg;
clrscr();
printf("Enter marks of three subjects : ");
scanf("%d%d%d",&m1,&m2,&m3);
total = m1 + m2 + m3;
avg = total / 3;
printf("\nTotal = %d Average = %d",total,avg);
getch();
}

0 Comments