learn c & c++ with asrr
Saturday, 16 September 2017
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:
Wednesday, 6 September 2017
C++ Program to calculate the greatest of three numbers using nested if-else
But if the condition (a>b) is false then it checks for the condition (b>c) . If condition (b>c) is true then second number __ is greatest is print otherwise third number __ is greatest is print.
for any other queries comment below....
Tuesday, 5 September 2017
Monday, 4 September 2017
Sunday, 3 September 2017
Subscribe to:
Posts (Atom)
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=...
-
output : enter marks in 3 subjects : 90 60 30 first division In the above program we can also use if statement in th...
-
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=...
-
In this program, we first enter a number (say 10). Then check the condition (10%2) . If it gives result zero(0) , then then it prints th...