If the marks obtained by a student in five different subjects are inputs through the keyword.Write a program to find out the aggregate 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.

                         <<<...PROBLEM-1.3...>>>

If the marks obtained by a student in  five different subjects are inputs through the keyword.Write

a program to find out the aggregate 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.  


               solution  ...>>>



program===




   /*calculation of aggregate $ percentage marks*/



  #include<stdio.h>

  int main()


{

  int m1,m2,m3,m4,m5,aggr;

  float per; 

    


  printf("\nEnter marks in five 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\n",aggr);

  printf("percentage marks=%f\n",per);





     return 0;

                }




       <<<...OUTPUT...>>>


     Enter marks in 5 subject:85 75 60 72 56

  Aggregate Marks =348

  Percentage Marks=69.000000





MUST READ THIS POST......TOP REASONS FOR LEARNING 'C' LANGUAGE

Post a Comment

0 Comments