Any help appreciated, this is for an intro to programming logic class.
Problem:
Write a program (using pseudocode) to prepare a monthly bank statement. The input will contain the customer name, account number, old balance, total monthly deposit amount, and total monthly withdrawal amount. The statement will contain the customer name, account number, old balance, and new balance. The new balance is computed by adding the total monthly deposit amount to, and subtracting the total monthly withdrawal amount from, the old balance. If the new balance is less than $100.00, then a $5.00 service fee will be subtracted from the new balance to determine the correct new balance.
Answer (Does this look correct? I think something is off but I don't know how to correct it). Also this problem should make use of a null else (else) statement:
I originally had this:
Updated Answer:
Problem:
Write a program (using pseudocode) to prepare a monthly bank statement. The input will contain the customer name, account number, old balance, total monthly deposit amount, and total monthly withdrawal amount. The statement will contain the customer name, account number, old balance, and new balance. The new balance is computed by adding the total monthly deposit amount to, and subtracting the total monthly withdrawal amount from, the old balance. If the new balance is less than $100.00, then a $5.00 service fee will be subtracted from the new balance to determine the correct new balance.
Answer (Does this look correct? I think something is off but I don't know how to correct it). Also this problem should make use of a null else (else) statement:
I originally had this:
Code:
Start
Read NAME, A#, OBAL, TMD, TMW
NBAL = OBAL + TMD TMW
IF NBAL < 100 THEN
RNBAL = NBAL - $5.00
Write NAME, A#, OBAL, RNBAL
(ELSE)
ENDIF
Write NAME, A#, OBAL, NBAL
Stop
Updated Answer:
Code:
Start
Read NAME, A#, OBAL, TMD, TMW
NBAL = OBAL + TMD TMW
IF NBAL < 100 THEN
NBAL = NBAL - $5.00
(ELSE)
ENDIF
Write NAME, A#, OBAL, NBAL
Stop