Thread: balance sheet help

  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    1

    balance sheet help

    Hello people of cprogramming.com

    i need some help in writing a programming which is short should do the following:

    program displays a menu that offers the user four options:

    * enter a transaction
    * view the general journal
    * view the balance sheet
    * quit the program



    Balance Sheet
    Account Description Debit Credit
    ------- ------------------------------ ---------- ----------
    1400 1500.00
    1000 899.01
    1100 1000.00
    1300 2100.99
    ---------- ----------
    Total Assets 5500.00

    2100 3500.00
    ---------- ----------
    Total Liabilities 3500.00

    3100 4000.00
    3200 2000.00
    ---------- ----------
    Total Equity 2000.00
    ---------- ----------
    Total Liabilities and Equity 5500.00


    There are 30 blank spaces reserved for each account description (to be added later).

    Note the subtotals for the account types - assets, liabilities, and equity - and the sum of the liability and equity accounts.

    [Hint: You may store the account balances in a separate array and adjust them whenever the user enters a transaction. Alternatively, you may calculate the account balances afresh every time the user displays the balance sheet.]

    You may assume a maximum of 20 transactions and a maximum of 10 different accounts. These limits will allow you to display either the general journal or the balance sheet on a 24-line screen.


    if i could get some help in going about in making the balance sheet it would be appreciated.

    so far i have the done the coding for the transaction menu and the journal.

    Basically i need to SORT the following arrays for the balance sheet

    transaction_amount[m]
    transaction_type[m]
    transaction_account[m]

    so lets say i have the following values for the arrays:
    transaction_account[m]: 1400, 1200, 1000, 1400, 1200, 1000, 900, 900
    transaction_type[m] : D , D , C , D , C , D , D , C
    transaction_amount[m]: 200 , 500, -500 , 750 , -1000, 750, 800, -400

    i would want them sorted as:
    transaction_account[m]: 1400, 1200, 1000, 900
    transaction_type[m] : D , C , D , D
    transaction_amount[m]: 950 , -500, 250 , 400


    however since im a beginner in arrays and c programming i have no clue on how to go about sorting them.
    Last edited by pickler; 11-15-2009 at 12:27 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 10-08-2007, 09:44 AM
  2. don't get this problem??
    By limitmaster in forum C++ Programming
    Replies: 3
    Last Post: 09-11-2006, 02:37 AM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Seeking Critique about my prog!
    By Yevmaster in forum C++ Programming
    Replies: 3
    Last Post: 05-26-2003, 01:04 PM
  5. I need help badly
    By taz_jiggy in forum C++ Programming
    Replies: 4
    Last Post: 04-23-2002, 09:36 PM