You've written deposits where you meant nm_deposits. You've omitted an ampersand off of a scanf variable. This program is much easier to understand if you reduce the scope of the x variable to the "Get Deposit Amounts" section, and the y variable to the "Get Withdrawal Amounts" section. You can reduce the scope of c and i also.Code://Get Deposit Amounts { int x = 1; while... } } } printf ("\n");