Hello everyone !
else if() ladder
if(cond1)
{
statement1;
}
else if(cond2)
{
statement2;
}
else if(cond3)
{
statement3;
}
else
{
statement4;
}
Write a program to input marks of five subjects Physics, Chemistry, Biology, Mathematics and Computer. Calculate percentage and grade according to following:
Percentage >= 90% : Grade A
Percentage >= 80% : Grade B
Percentage >= 70% : Grade C
Percentage >= 60% : Grade D
Percentage >= 40% : Grade E
Percentage < 40% : Grade F
nested if-else()
if(cond1)
{
if(cond2)
{
statement1;
}
else
{
statement3;
}
}
else
{
statement4;
}
Write a program to check whether a student is from non-medical or medical and he is a dropper student or not?
Input format:
Take two input from user where first input is either 'b'
where b for
Output format:
He is dropper/non-dropper and medical/non-medical student.
Sample input:
b y
Sample output:
He is
Write a program to take an input from
Loop
- print the numbers between 1 to 10.
Subtitle
while loop
A while loop is used for repeatedly executions of some statements till the condition of while loop is true
initialization;
while(condition)
{
statements;
increment;
}
deck
By MRITUNJAY GOUTAM
deck
- 660