I have my program running just about the way I want it to but can't work out some final details.
Basically I want to run this loop while the acc does not = 9999
Code:
//loop to gather account information
while(acc != 9999){//run loop while account number does not = 9999
acc = accno();
//break loop if acc = 9999
if(acc == 9999)
{
break;
}
//count account entries
bal = balance(); // balance function
pur = purchase(); // purchase function
pay = payment(); //payment function
cr = credit(); //credit function
interim = iendbal( bal, pur, pay, cr);
interest = accint(interim);
final = fendbal(interest, interim);
printfun(acc,bal,pur,pay,cr,interest,final);
totfeb = totfeb + final;
}
But acc can only be between 1000 - 4000. How can I write another if statement to loop back to prompting for acc if the account number doesn't meet these conditions.
Edit: added a little more code for clarification.