|
|
@ -8,12 +8,21 @@ float timeInYears; |
|
|
|
|
|
|
|
printf("Please enter the principal amount:"); |
|
|
|
scanf("%f",&principalAmount); |
|
|
|
if(principalAmount<=0){ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
printf("\nPlease enter interest per year (percentage):"); |
|
|
|
scanf("%f",&interestPerYear); |
|
|
|
if(interestPerYear<=0){ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
printf("\nPlease enter interest time in years:"); |
|
|
|
scanf("%f",&timeInYears); |
|
|
|
if(timeInYears<=0){ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
float interestDecimal=interestPerYear/100; |
|
|
|
|
|
|
|