How to calculate loan

There’s a problem in my programming. The monthly payment and total payments are not adding up in the output. Meaning it stays the same like this Monthly Payment Total Payment $188.71 …