C Language
#include<stdio.h> #include<conio.h> void main() { int a,b,c,d,e,T,P; clrscr(); printf("Enter marks in 5 subjects"); scanf("%d%d%d%d%d",&a,&b,&c,&d,&e); T=a+b+c+d+e; P=T/5; printf("Total marks=%d",T); printf("percentage=%d",P); getch(); } /*OUTPUT*/ Enter marks in 5 subjects 60 70 80 90 50 Total marks = 350 percentage = 70