Purchase Solution

Practice Program Loops, Simple I/O & Simple Calculations

Not what you're looking for?

Ask Custom Question

Need Some Assisstance With A Practice Problem:

Be sure you have access to an ANSI C (not C++) compiler. Code compiles for C++ may or may not be compatible with C.

Assignment

1. You are to write the basis for what will become, in increments, a small "banking system." This first increment just maintains up to 25 accounts and 0 - 1 million transactions.

2. Store the 25 accounts, including account numbers and balances as an array or arrays, as appropriate.

3. Input will consist of a transaction type (CR for credit and DB for debit), an account number and an amount.

4. You are to (1) initialize the accounts with a zero balance; (2) read in the transactions and adjust the balance of the matching account appropriately; (3) at the end of the program, print out the balances for all accounts.

5. Things to remember:

a) What if the account number on a transaction doesn't match an existing account number?

b) What if an account balance drops below zero? Overdrafts are not allowed.

c) What if the transaction type doesn't match DB or CR?

Attachments
Purchase this Solution

Solution Summary

This solution assists with practice program loops, simple I/O and other simple calculations.

Solution Preview

Please find attached source code file sample.cpp. Compiled with C option as requested. You can change the MAXACNTS to ...

Purchase this Solution


Free BrainMass Quizzes
Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Basic Networking Questions

This quiz consists of some basic networking questions.

C++ Operators

This quiz tests a student's knowledge about C++ operators.