From e7810a357f0409553fc692145bee15919d91c31a Mon Sep 17 00:00:00 2001 From: fdlt3817 Date: Thu, 9 Feb 2023 22:54:32 +0100 Subject: [PATCH] Create error outputs --- src/sendmoney.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/sendmoney.c b/src/sendmoney.c index fd4a7fe..930f954 100644 --- a/src/sendmoney.c +++ b/src/sendmoney.c @@ -9,7 +9,7 @@ bool sendMoney(int customerID){ printf("\nYou have %.2f€ in your account. How much would you like to send?\n",availableAccountBalance); scanf("%f",&amountToSend); if(amountToSend>0 && amountToSend1000){ bool recExists=checkCustomerExists(recID); @@ -19,6 +19,8 @@ bool sendMoney(int customerID){ printf("\nYou have successfuly transfered %.2f€ to [%d]",amountToSend,recID); return true; } + }else{ + printf("\nSomething went wrong with the transfer. Please contact staff."); } }else{ if(withdrawSpecificAmount(customerID, amountToSend)){ @@ -27,6 +29,11 @@ bool sendMoney(int customerID){ } } } + else + { + printf("\nThe ID you have entered is not valid. Aborting. \n"); + } + }else{ //error return false;