This commit is contained in:
Tyler Beckman 2024-09-22 19:52:47 -06:00
parent e64f1a0f1e
commit 68e45dd3b5
Signed by: Ty
GPG key ID: 2813440C772555A4
2 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
TARGET = CHANGEME TARGET = A2
SRC_FILES = main.cpp SRC_FILES = main.cpp atmFunctions.cpp
# Tyler's custom makefile extensions for CSCI200 (anyone can use these if they want) # Tyler's custom makefile extensions for CSCI200 (anyone can use these if they want)
.DEFAULT_GOAL := all # Necessary so `make` doesn't run the "pack" target, as it is declared before "all" .DEFAULT_GOAL := all # Necessary so `make` doesn't run the "pack" target, as it is declared before "all"
@ -80,4 +80,4 @@ depend:
.PHONY: all clean depend .PHONY: all clean depend
# DEPENDENCIES # DEPENDENCIES
main.o: main.cpp main.o: main.cpp atmFunctions.h

View file

@ -130,7 +130,7 @@ void withdraw_money(int* pDollars, int* pCents) {
normalize_dollars(&dollarsToWithdraw, &centsToWithdraw); normalize_dollars(&dollarsToWithdraw, &centsToWithdraw);
// Convert dollar amounts to cents for easier subtraction // Convert dollar amounts to cents for easier subtraction
int totalCentWithdrawal = dollarsToWithdraw + (dollarsToWithdraw * 100); int totalCentWithdrawal = centsToWithdraw + (dollarsToWithdraw * 100);
*pCents += *pDollars * 100; *pCents += *pDollars * 100;
*pDollars = 0; *pDollars = 0;