C program to calculate the total and percentage of eight subjects for SEE and NEB
#include<stdio.h>
#include<conio.h>
main()
{
int a,b,c,d,e,f,g,h,total;
float per;
printf("\nInput Mark of English:- ");
scanf("%d",&a);
printf("\nInput Mark of Nepali:- ");
scanf("%d",&b);
printf("\nInput Mark of Science:- ");
scanf("%d",&c);
printf("\nInput Mark of Maths:- ");
scanf("%d",&d);
printf("\nInput Mark of Social:- ");
scanf("%d",&e);
printf("\nInput Mark of Computer Science:- ");
scanf("%d",&f);
printf("\nInput Mark of Economics:- ");
scanf("%d",&g);
printf("\nInput Mark of Opt. Math:- ");
scanf("%d",&h);
total=a+b+c+d+e+f+g+h;
per=total/8;
printf("Total marks=%d\n",total);
printf("\Percentage=%f",per);
getch();
}
Output:
No comments:
Post a Comment