0
Please why it keep asking me the user input? Instead of printing the result?
2 Réponses
+ 3
There are few reasons why it keep asking for input.
1. You used a while loop.
2. In order to break the loop, you set the criteria which require both expression (x % num and x % num2) to be False.
3. The expressions need to be 0 to become False.
With the right combination and repeatedly enter the same input the code will break and print the result.
For example, num is 4 and num2 is 6.
It requires 12 times of input (4 & 6) to break the loop.
When the loop reached the 12th times, x become 12 and x is dividable by both 4 and 6.
+ 1
or you can enter 1 for num and 1 for num2