176k views
5 votes
What is another way that the condition below could be written? ​ ( num <= 10 )

User Ventiseis
by
5.5k points

1 Answer

4 votes

Answer:

( (num < 10) || (num = 10) )

Step-by-step explanation:

Here we have the condition as num <= 10 which means the condition gets satisfied till less than 10 i.e., (9) and condition also gets satisfied when the num is equal to 10 .

We can get same result using ( (num < 10) || (num = 10) ) because in OR when either of the input is true the output is true .

User Mahozad
by
5.6k points