Jan-24-2024, 05:28 PM
(This post was last modified: Jan-24-2024, 05:28 PM by deanhystad.)
Not really. It checks if a number is prime. A subtle, but important difference. What role does "a" play? Is it the potential prime number, or a potential factor?
The code is poorly written. "a" should be passed as a function argument, not as a global variable. The function should return a value instead of printing a message.
The code is poorly written. "a" should be passed as a function argument, not as a global variable. The function should return a value instead of printing a message.