Step 7 – Testing the program
All we have left to do is to test that the program works.
Run your code (Run > Run Module) and test it.
There's a lot to test:
- Check what happens when each of A, S, M, and D are entered
- Check what happens when you don't use a capital letter
- Check what happens if you enter something other than A, S, M, or D
- Check what happens when you enter really big numbers
- Check what happens when one or both of the numbers are negative
- Check what happens when one or both of the numbers are 0 (zero)
The program should just about work almost perfectly.
But not quite. There's one thing that will cause a problem. Can you find it and figure out why?