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.

1 min read

                         <<<...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

Welcome to prgrmramit.blogspot.com! I'm Amit Singh, an expert in AI, Data Science, and Machine Learning. I created this blog to share practical insights and tips for those eager to learn and gro…

You may like these posts

  •  Exercise[6B(c)]When interest compunds q times per year at an annual rate of r% for n years,the principle p compounds to an amount a as per the following formula a=p(1+r/q)^nq…
  •  Exercise[6B(d)]The natural logarithm can be approximated by the following series. x-1/x+1/2(x-1/x)^2+1/2(x-1/x)^3+1/2(x-1/x)^4+... If x is input through the keyboard,write a …
  •  Exercise [B(a)]Write a program to print the multiplication table of the number entered by the user.The table should get displayed in the following form: 29*1=29 29*2=58 ...…
  •  PROBLEM 6.3Write a program to generate all combinations of 1,2 and 3 using for loop. */ #include<stdio.h> int main() { int i=1,j=1,k=1; for(i=1;i<=3;i++) { fo…
  •  Exercise[6B(b)]According to a study,the approximate level of intelligence of person can be calculated using the following formula: i=2+(y+0.5x) Write a program that will pr…
  •  /* PROBLEM 6.2Write a program to add first seven terms of the following series using a for loop. 1/1!+2/2!+3/3!+.... */ #include<stdio.h> int main() { int i=1…

Post a Comment

Subscribe with Gmail


Premium By Raushan Design