Nov-05-2022, 01:48 PM
(This post was last modified: Nov-05-2022, 01:48 PM by deanhystad.)
Why check if user input > 0? There is nothing special about 0.
Your checks for < 2 and == 2 are in the wrong place.
The for loop is wrong.
You are back to checking lots of factors that don't need checking.
Do some research on the for loop. It has a feature that could be useful. Should read about range too while you're at it.
Your checks for < 2 and == 2 are in the wrong place.
The for loop is wrong.
You are back to checking lots of factors that don't need checking.
Do some research on the for loop. It has a feature that could be useful. Should read about range too while you're at it.