Q3 If the marks obtained by a student in five different subjects are input through the keyboard, 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.

Program: 53

Write a program to calculate aggregate marks and percentage marks obtained by the student in five subjects. | Let Us C Solutions

Output:

Enter the marks of Hindi: 50
Enter the marks of Math: 50
Enter the marks of English: 50
Enter the marks of Science: 50
Enter the marks of Art: 60

Aggregate marks: 260
Percentage marks: 52.00 %

Lokesh Kumar

Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.

2 thoughts on “Q3 If the marks obtained by a student in five different subjects are input through the keyboard, 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.

  • September 10, 2020 at 9:35 am
    Permalink

    what if we enter marks greater than 100 ?

    Reply
    • September 10, 2020 at 10:13 am
      Permalink

      so we have to set the maximum marks for getting right percentage otherwise it will return wrong percentage result

      Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.