First image is my code and the second is my output and the output that it expects.
enter image description here
It asks for me to input 5 different sets of numbers which is why I have multiple in the program. the sets are (3,1,4) (1,1,0) (21,12,5) (,0,0,0) and (23,99,40)
Im trying to figure out why my output is showing 314 at the beginning and the 1 at the end, mainly the highlighted part of my output.