Answer to Question #51715 in C for Matt

Question #51715
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: ");

scanf ("%f",&currentbalance;);

fflush(stdin);


/* an error is displayed if th
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS