0
what is the difference b/w while(a!=0) and while(a==0) in term of the execution of loop?
I am confused with these condition that how many time will the loop be executed when we use such condition.
4 Réponses
+ 2
(a!=0) means the loop iterates in all the conditions except when a is 0. If the condition is (a==0) then the loop iterates only when a is equal to 0
+ 1
!= means not equal, == means equal to.....,, the "while" will only execute if the condition is true
0
while(a==0) doesn't mean that it iterates till a is zero
0
can you explain it in long