0
i don't understand about if-else
I hope anyone will that anyone will help me
3 Respostas
+ 11
Rhohit Bojarajoo Please,
Read the COMMENTS in the lessons you can find great examples and explanations.
+ 1
if is a statement that runs a block of code if its condition evaluates to true.
else is a statement that follows an if statement and it runs it's code if if statement's condition evaluates to false.
It does not much differ about how you would speak it.
In C:
if (50 > 4) {
printf("50 is more than 4");
} else {
printf("50 is not more than 4");
}
In speech:
if 50 is more than 4 print "50 is more than 4",
otherwise print "50 is not more than 4".
0
Thank you