I am working on a checkbook type program. I need to print a statement for
the user to select an option from. Based on that option, the program will
either add money to the "account" or subtract money from it. I need to set
it up so that the user will deposit money first before writing a check. I need to have a loop in the main program and the deposit function. I was going to use a for loop, but I'm not sure where it should go or how to code it. I am new at C programming, and I am trying to learn. This is what I have so far:
void checking (void)
void deposit (void)
float balance = 0;
int main (void)
int checking ;
int getfirst (void);
printf("Enter D to deposit money, C to write a check, Q to quit.\n");
if (choice=='D') deposit();
I am not sure how to continue from here. Should I use the scanf function?
What would I use with that option (%s, etc.)? I think I might be setting this up wrong. I would appreciate some
assitance in putting this together.