pls if you like please help me to analyze my prog.
i want to happened this you balance is 500 and when you times it
in .02% the answer is 10 and the balance is 510.
and in logical i want to happened that when your balance is 510 and
when you withdraw 520 the answer is insufficent funds or cannot be.
please help me......
in my account
#include"account.h"
// creates another account here using memory allocations
initialize(&a1,1,"James Yap". 5000.00);
.....
temp[0]=a1;
// in function implementation
/* computes/updates interest for account pointed to by a and returns
the updated balance */
double computeInterest(Account *a, double rate)
{
return a->balance=a->a balance * rate;
}
// main
case 3: printf("\nIntereset rate: ");
scanf("%lf",&amount);
rate=amount*rate;
case 2: printf("\nAmount to withdraw: ");
scanf("%lf",&amount);
if (withdraw(&temp[y],amount==1)
printf("Withdraw %lf",amount);
else
printf("Insufficient funds");