I am writing a program from a book where it finds the greatest and least numbers. Technically it does work just doesn't work how it should. It grabs the greatest and least number but when I hit -99 it still takes that number as num which I understand why it is doing it but not sure how to fix it. I tried taking the input out of the do while, tried just a while but neither seem to work. I know it is probably something simple just cant figure it out.
If you want to keep a do while loop, you could pull lines 11 and 12 and put them at line 8 (before the do starts), then repeat them at line 23 (before you evaluate the while condition).