+ 2
What is while loop?
Are those which are depend on us are called while loop
3 odpowiedzi
+ 29
if u want to execute certain statements only if codition specified comes to true , then u can use while () , for () loop
there is difference of syntax
example ::: .
int a=3;
while (a>=1){
System.out.println(a); // 3, 2 ,1
a--;
}
+ 3
x = 6
while ( x != 0 ){
// it will run until x becomes zero
--x;
}
+ 2
How many want to run are depend on us