The code apparently satisfies all conditions except "3. After entering -1, the program must correctly terminate." Though with "Run (without verification)", I get the required results for all the combinations listed..