Thursday, May 7, 2015

write a program to caculate the percentage of the student in given marks

 If the marks obtained by a student in five different subjects are input through the keyboard, find out the aggreagte marks and percentage marks obtained by the student. Assume that the maximum marks that can be obtained by a student in each subject is 100.

#include<stdio.h>
#include<conio.h>
main()
{
      int m1,m2,m3,m4,m5,aggr;
      float per;
      printf("\nEnter marks in 5 subjects:");
      scanf("%d%d%d%d%d",&m1,&m2,&m3,&m4,&m5);
      aggr=m1+m2+m3+m4+m5;
      per=aggr/5;
      printf("Aggregate Marks=%d",aggr);
      printf("\nPercentage Marks=%f",per);
      printf("\n\n\n\n\nEnter any for Exit....");
      getch();
     
     
     
      }

No comments:

Post a Comment

Featured Post

What is JavaScript? What is the role of JavaScript engine?

  The JavaScript is a Programming language that is used for converting static web pages to interactive and dynamic web pages. A JavaScript e...