diff --git a/src/depositMoney.dSYM/Contents/Resources/DWARF/depositMoney b/src/depositMoney.dSYM/Contents/Resources/DWARF/depositMoney deleted file mode 100644 index b151b78..0000000 Binary files a/src/depositMoney.dSYM/Contents/Resources/DWARF/depositMoney and /dev/null differ diff --git a/src/interestCalculator.c b/src/interestCalculator.c index a561d55..407e2d9 100644 --- a/src/interestCalculator.c +++ b/src/interestCalculator.c @@ -23,22 +23,19 @@ void calculateYearlyInterest(){ float timeInYears; printf("Please enter the principal amount:"); - scanf("%f",&principalAmount); - if(principalAmount<=0){ + if (scanf("%f", &principalAmount) != 1 || principalAmount <= 0) { troubleshoot(0); return; } printf("\nPlease enter interest per year (percentage):"); - scanf("%f",&interestPerYear); - if(interestPerYear<=0){ - troubleshoot(1); + if (scanf("%f", &interestPerYear) != 1 || interestPerYear <= 0) { + troubleshoot(0); return; } printf("\nPlease enter interest time in years:"); - scanf("%f",&timeInYears); - if(timeInYears<=0){ + if (scanf("%f", &timeInYears) != 1 || timeInYears <= 0) { troubleshoot(2); return; } @@ -46,7 +43,7 @@ void calculateYearlyInterest(){ float interestDecimal=interestPerYear/100; float result= principalAmount*(1+(interestDecimal*timeInYears)); - printf("\nAmount with the interest is %.2f.",result); + printf("\nAmount with the interest is %.2f€.",result); } void calculateMonthlyInterest(){ float principalAmount; @@ -54,22 +51,19 @@ void calculateMonthlyInterest(){ float timeInMonths; printf("Please enter the principal amount:"); - scanf("%f",&principalAmount); - if(principalAmount<=0){ + if (scanf("%f", &principalAmount) != 1 || principalAmount <= 0) { troubleshoot(0); return; } printf("\nPlease enter interest per month (percentage):"); - scanf("%f",&interestPerMonth); - if(interestPerMonth<=0){ - troubleshoot(1); + if (scanf("%f", &interestPerMonth) != 1 || interestPerMonth <= 0) { + troubleshoot(0); return; } printf("\nPlease enter interest time in months:"); - scanf("%f",&timeInMonths); - if(timeInMonths<=0){ + if (scanf("%f", &timeInMonths) != 1 || timeInMonths <= 0) { troubleshoot(2); return; } @@ -77,7 +71,7 @@ void calculateMonthlyInterest(){ float interestDecimal=interestPerMonth/100; float result= principalAmount*(1+(interestDecimal*timeInMonths)); - printf("\nAmount with the interest is %.2f.",result); + printf("\nAmount with the interest is %.2f€.",result); } void initiateCalculator(){ diff --git a/src/updateCustomerAccountBalance.dSYM/Contents/Resources/DWARF/updateCustomerAccountBalance b/src/updateCustomerAccountBalance.dSYM/Contents/Resources/DWARF/updateCustomerAccountBalance deleted file mode 100644 index 9360d10..0000000 Binary files a/src/updateCustomerAccountBalance.dSYM/Contents/Resources/DWARF/updateCustomerAccountBalance and /dev/null differ