diff --git a/src/.vscode/c_cpp_properties.json b/src/.vscode/c_cpp_properties.json index 2bf8aa4..5a5047e 100644 --- a/src/.vscode/c_cpp_properties.json +++ b/src/.vscode/c_cpp_properties.json @@ -3,8 +3,7 @@ { "name": "Win32", "includePath": [ - "${workspaceFolder}/**", - "${workspaceFolder}/" + "${workspaceFolder}/**" ], "defines": [ "_DEBUG", diff --git a/src/a.exe b/src/a.exe new file mode 100644 index 0000000..91bc69c Binary files /dev/null and b/src/a.exe differ diff --git a/src/depositMoney.c b/src/depositMoney.c index 618a352..1252104 100644 --- a/src/depositMoney.c +++ b/src/depositMoney.c @@ -1,13 +1,32 @@ -#include +#include "depositMoney.h" + -int InitiateDepositMoney(float amountToDeposit, float availableAccountBalance){ //type of int to return possible end cases. - +int InitiateDepositMoney(float amountToDeposit, float availableAccountBalance){ //type of int to return possible end cases. + return 1; } int DepositMoney(){ + //TODO: Set a minimum deposit amount. + float amountToDeposit; + float availableAccountBalance = 10000; //for testing purposes. will be replaced with an actual function to retrieve this data. + printf("Please enter the amount to deposit: "); + scanf("%f", &amountToDeposit); + if(amountToDeposit>0){ + //InitiateDepositMoney(amountToDeposit,availableAccountBalance); + printf("You have successfully deposited %f. New account balance is %f", amountToDeposit, availableAccountBalance+amountToDeposit); + return 0; + }else{ + return 1; //invalid input + } +} -} \ No newline at end of file +int main() +{ + char any; + DepositMoney(); + scanf("%c", &any); +} \ No newline at end of file diff --git a/src/depositMoney.h b/src/depositMoney.h index 9c3e7e7..1ebb776 100644 --- a/src/depositMoney.h +++ b/src/depositMoney.h @@ -1,4 +1,4 @@ #include - +#include int InitiateDepositMoney(float amountToDeposit, float availableAccountBalance); int DepositMoney(); \ No newline at end of file diff --git a/src/main.c b/src/main.c index 2e0147f..db4aea3 100644 --- a/src/main.c +++ b/src/main.c @@ -2,6 +2,6 @@ int main() { - + return 0; }