Thursday, March 27, 2014

Ladder if or else if statement

The marks obtained by a student in 5 different subjects are input through the keyboard. The student gets a division as per the following rules:

=> Percentage above or equal to 60 - First Division
=> Percentage between 50 and 59 - Second Division
=> Percentage between 40 and 49 - Third Division
=> Percentage less than 40 - Fail

Method: 1




Method: 2







No comments:

Post a Comment