This is bizzare what exactly is if? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

This is bizzare what exactly is if?

I'm lost.

10th Jun 2018, 10:00 PM
Bernie Vargas
Bernie Vargas - avatar
3 Réponses
+ 13
if(condition) {statements} if the given condition evaluates to true it will execute the statements else not.
10th Jun 2018, 10:15 PM
Mohammad Amir Aqeel
Mohammad Amir Aqeel - avatar
+ 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!"); }
10th Jun 2018, 10:23 PM
laura
+ 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.
11th Jun 2018, 12:25 AM
Bebida Roja
Bebida Roja - avatar