Just because you use variables with the same names in your main function and your convert function does not mean that they are related in any way, shape, or form.
Just because you use variables with the same names in your main function and your convert function does not mean that they are related in any way, shape, or form.
All variables declared in a function are completely inaccessible outside that function (so anything declared in main is not visible in convert, and anything declared in convert is not visible in main). So you have two variables named total_converted_minutes, but they're never both defined at the same time.