Hello everyone,
i need to enter a value into a savings account paying 7% interest and €1,000 is withdrawn from the account at the end of each year. How many years are required for the savings account to be depleted?
here's wat i did, but the loop not working:
#include <stdio.h>
#include <stdlib.h>
#define interest 0.07
int main()
{
int salary;
float final_sum;
do
{
printf("\n Enter a Value");
scanf("%d",&salary);
final_sum = (salary-(salary*interest))-1000;
printf("%0.02f",final_sum);
}
while (final_sum <1000);
system("PAUSE");
return(0);
}
any help please
thanks