I created a program to allows the user to make some simple banking transactions. Now I need to add at least two non-trivial functions in the program. (Non-trivial means that the function does more than simply print a line of text.). Part of my program is listed below. Can you tell me what non-trivial functions I need to add.
/* Declare variables */
int x, numdeposits, numwithdrawals;
float deposits[50], withdrawals[50];
float currentbalance, balance;
float totdeposits = 0, totwithdrawals = 0;
char firstname[20];
/* Display Greeting */
printf("Welcome to the LaVine Banking System.\n\n");
/* Display to prompt the user's first name */
printf ("Please enter your first name: ");
scanf ("%s", firstname);
fflush(stdin);
/* Displays a greeting with the user's name*/
printf("\nHello, %s.\n\n", firstname);
do
{
/* Prompts the user to enter current balance*/
printf ("Enter your current balance in dollars and cents: ");
Comments
Leave a comment