|
|
Enter an integer up to 10: 11 Invalid input. Continue? (y/n): y Enter an integer up to 10: 0 Factorial of 0 = 1 Continue? (y/n): y Enter an integer up to 10: -1 Invalid input. Continue? (y/n): n Goodbye Enter an integer up to 10: -1 Invalid input. Continue? (y/n): h Derp Enter an integer up to 10: |
while (key = true)
this is an assignment statement, not an equality statement. So this will allways evaluate to true. I would just go with this while (key)