I'm trying to get my while loop to include negative numbers except -9999.
I could get my code to read positive numbers like 5 having a sum of odd numbers of 9, but trying to get negative numbers never worked such as this:
This code works for positive numbers, but not negative. I couldn't get it to work for negative numbers, as it would give me like -2362970237907 or something similar.
I've tried several different ways including getting an output of really high negative numbers when entering -5.
This is the best I could do with the code although it doesn't give me an output for some reason when i enter a number like 5. Why isn't it?
Here's my code: