looping methods of statements | Sololearn: Learn to code for FREE!

0

looping methods of statements

how one loops while,if and other loops

6/20/2018 6:38:17 PM

Kanana Kanana

7 Answers

New Answer

+1

if is not a loop

+1

Kanana Kanana while continuously executes the code within it, if only does it once.

0

then explain how if works hinanawi

0

Kanana Kanana if(condition) {do stuff} means that if the condition is true (example: 2*2 == 4/2) the expression below it will be executed. if not, everything within the block is skipped and if there's else statements those are checked after.

0

hinanawi but also While does the same execution as the one you have just mentioned so how different is it??

0

further explain the use of for also

0

Kanana Kanana for has a more complex structure, and usually has a variable that it keeps track of. for is mostly used to execute code a certain set number of times.