9.5k views
1 vote
Which is a correct way to test whether two variables representing numbers, numOne and numTwo, are equal?

User Ddolce
by
3.6k points

1 Answer

6 votes

Step-by-step explanation:

Intital value of variable "NUM" is 10 when while loop execute for the first time , it check the condition ( num<10) and founds this FALSE. So the statement inside execute if while loop doesn't execute then it will not going to change the value of "NUM " . That is why the value of "NUM" will remain same i.e NUM 10

User Sudhishkr
by
3.8k points