Write a C program to manage 50 bank accounts. The accounts are identified by numbers ranging from 100 to 149 as integer values. For instance, Account number 100 corresponds to the data stored in index 0, and account number 111 corresponds to the data stored in index 11. Therefore, when a user provides an account number, your program should include a function that returns the index where that account is stored. The program can handle various transactions and will be implemented as a menu driven program. You will use an array to store information for the 50 accounts. Initially, this array of accounts will be initialized to -1, where -1 signifies that the account is not yet open. The following table presents the questions that the program will ask the user. Each response to a transaction-type question should be a single character. If the user provides an illegal character, the program should display an error message. All amounts are in dollars and can have up to 2 decimal places. Note: Use the interest formula below for your interest calculation balance += balance * interestRate / 100 Transaction type?: O or o Initial deposit?: amount Open an account, giving the initial deposit. Allowed if less than 50 accounts now open and Amount should be greater or equal to 100 dollar. Prints the new account number. Transaction type?: B or b Account number?: account_number A Balance inquiry, prints the account number and the balance, only allowed if the account is open. Transaction type?: D or d Account number?: account_number Amount?: amount A Deposit, prints the account number and new balance, only allowed if account open. Transaction type?: W or w Account number?: account_number Amount?: amount A Withdrawal, only allowed if account open and sufficient funds available, prints account number and new balance. Transaction type?: C or c Account number?: account_number Close the account. Only allowed if account is open. Transaction type?: I or i. Interest rate?: interest_rate Compute interest at given % rate.and apply to all accounts Transaction type?: P or p Print all the account numbers and amounts. Transaction type?: E or e Close all accounts and exit program

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Write a C program to manage 50 bank accounts. The accounts are identified by numbers ranging from 100 to 149 as integer values. For instance, Account number 100 corresponds to the data stored in index 0, and account number 111 corresponds to the data stored in index 11. Therefore, when a user provides an account number, your program should include a function that returns the index where that account is stored. The program can handle various transactions and will be implemented as a menu driven program. You will use an array to store information for the 50 accounts. Initially, this array of accounts will be initialized to -1, where -1 signifies that the account is not yet open. The following table presents the questions that the program will ask the user. Each response to a transaction-type question should be a single character. If the user provides an illegal character, the program should display an error message. All amounts are in dollars and can have up to 2 decimal places.

Note: Use the interest formula below for your interest calculation balance += balance * interestRate / 100

Transaction type?: O or o Initial deposit?: amount Open an account, giving the initial deposit. Allowed if less than 50 accounts now open and Amount should be greater or equal to 100 dollar. Prints the new account number.

Transaction type?: B or b Account number?: account_number A Balance inquiry, prints the account number and the balance, only allowed if the account is open.

Transaction type?: D or d Account number?: account_number Amount?: amount A Deposit, prints the account number and new balance, only allowed if account open.

Transaction type?: W or w Account number?: account_number Amount?: amount A Withdrawal, only allowed if account open and sufficient funds available, prints account number and new balance.

Transaction type?: C or c Account number?: account_number Close the account. Only allowed if account is open.

Transaction type?: I or i. Interest rate?: interest_rate
Compute interest at given % rate.and apply to all accounts

Transaction type?: P or p Print all the account numbers and amounts.

Transaction type?: E or e Close all accounts and exit program

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education