Friday, 8 September 2017

If-else-If Ladder : Program to calculate the division of a student according to marks obtained



output :
       enter marks in 3 subjects : 90 60 30
       first division

In the above program we can also use if statement in the place of else if . But the time to execute the program is increased.In if statement every condition is checked whether it's true or false. In case of else if : if condition is true then exit, if false then going to check next condition.

for any other queries comment below: 

No comments:

Post a Comment

Nested If-else : To find the roots of quadratic equation ax2+bx+c=0 and a!=0

let ax 2 +bx+c=0 : is a quadratic equation output:             Enter the values of a,b,c : 1 -5 6             roots are x1=3  x3=...