+ 1
This is bizzare what exactly is if?
I'm lost.
4 Respostas
+ 13
if(condition)
{statements}
if the given condition evaluates to true it will execute the statements
else not.
+ 5
if is a statement that is used to evaluate if an expression is true or false...and depending on that outcome, it can execute a block of code... such as
int x = 5;
if (x == 5)
{
Console.Write("hello!");
}
else if ( x != 5)
{
Console.Write("good-bye!");
}
+ 2
exactly, it is a conditional jump from one part of the code to another. If the condition is true, it executes some piece of code, if not, other code is executed.