I have this prime numbers program to solve: given a max input, I am to determine all the prime numbers between 2 and the max input inclusive, using a while loop inside a while loop.  

I know this would be simpler using a range and/or math functions but for the purposes of this assignment I need to use while-loops. 

Testing the code below with `max = 5` outputs `2,3,4`.  

Correct output is `2,3,5`.

```
max = int(input('Enter the max integer: '))
start_number = 2

while start_number <= max:
    interval_number = start_number
    while interval_number <= max: 
        if max % interval_number != 0: 
            print(interval_number)
            interval_number += 1
    start_number += 1

```