PROGRAM 1
WAP that accepts the marks of 5 subjects and finds the sum and average marks obtained by
the student.
#include<stdio.h>;
#include<conio.h>;
void main()
{
int m1, m2, m3, m4, m5;
float sum, avg;
clrscr();
printf("Enter marks of Physics:\n");
scanf("%d", &m1);
printf("Enter marks of Mathematics:\n");
scanf("%d", &m2);
printf("Enter marks of PPS\n");
scanf("%d", &m3);
printf("Enter marks of Electrical:\n");
scanf("%d", &m4);
printf("Enter marks of Environment & Ecology:\n");
scanf("%d", &m5);
sum = (m1 + m2 + m3 + m4 + m5);
avg = (sum / 5);
printf("The total marks obtained = %f\n", sum);
printf("Average marks = %f\n", avg);
getch();
}