Question: Ram wants to know the maximum marks scored by him in each semester. The mark should be between 0 to 100 ,if goes beyond the

Ram wants to know the maximum marks scored by him in each semester. The mark should be between 0 to 100 ,if goes beyond the range display "You have entered invalid mark."

Sample Input 1:

Enter no of semester:

3

Enter no of subjects in 1 semester:

3

Enter no of subjects in 2 semester:

4

Enter no of subjects in 3 semester:

2

Marks obtained in semester 1:

50

60

70

Marks obtained in semester 2:

90

98

76

67

Marks obtained in semester 3:

89

76

Sample Output 1:

Maximum mark in 1 semester:70

Maximum mark in 2 semester:98

Maximum mark in 3 semester:89

Sample Input 2:

Enter no of semester:

3

Enter no of subjects in 1 semester:

3

Enter no of subjects in 2 semester:

4

Enter no of subjects in 3 semester:

2

Marks obtained in semester 1:

55

67

98

Marks obtained in semester 2:

67

-98

Sample Output 2:

You have entered invalid mark.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!