Hi again, I’m writing a program that will given that you have $10,000 in the bank with 4% interest and you take out $1000 every month, how many months will you be able to do that?
unsigned long int total=10000;
unsigned long int total_two;
unsigned long int total_three;
//unsigned int total_fn(void);
printf("If you have 250,000 dollars in your account with 4%% interest,
printf("And you withdraw 1,000 dollars a month, you will be able to withdraw for %d months.
/unsigned int total_fn(void)
the problem is that when it runs, it prints wild random numbers and never gets to the printing the months because it is always greater than zero. the reason I have unsigned long int total_two&_three is because I thought that maybe the problem was total=total-1000 etc. but it still dosen’t work. What am I doing wrong? thanks