Added a bit of code, so the program will repeat if A = 0.