in order to start my program, i need to create a type of menu using getchar and i have no idea where to start. the program is supposed to output this:
Enter P for payment calculation, L for loan calculation, or Q to quit:
and depending on the input runs specific functions in the program. so far, this is what i have (note: i am very new to C to cut me some slack if this looks terrible :P)
Code:#include <stdio.h> #include <math.h> int main() { int c; printf("Enter P for payment calculation, L for loan calculation, or Q to quit:"); c = getchar(); }
where am i supposed to go from here? i figure i can use an if statement if getchar returns an integer, but what values should i expect for P, L, and Q? am i even thinking about this right?