Write a program to calculate total and percentage marks obtained by a student in 5 subjects.

#include<stdio.h>

#include<conio.h>

int main()

{

clrscr();

int s1,s2,s3,s4,s5,total,per;

printf(“Enter the marks of 5 subjects:\nEach contain 100 marks:\n”);

scanf(“%d%d%d%d%d”,&s1,&s2,&s3,&s4,&s5);

total=s1+s2+s3+s4+s5;

per=total/5;

printf(“total marks in 5 subject=%d\n”,total);

printf(“percentage marks obtained in 5 subjects=%d”,per);

getch();

return 0;

 

}