Thread: ATM prog

  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    3

    ATM prog

    hi!

    anyone who has an idea about a simple program regarding the operation of automated teller machine ATM?
    i need your help asap!!!!!!
    so far i encountered problem on this part

    switch{transaction
    case 1:inquiry
    case 2:withdraw............................(it continuously operating even though my balance reaches to negative
    case 3:deposit
    ;
    ;
    ;
    }

  2. #2
    former member Brain Cell's Avatar
    Join Date
    Feb 2004
    Posts
    472
    first you need to use code tags when showing us your code. Second you should provide us with your actual code so we could see where the problem lies.

    no offense but don't expect much from threads like this.
    My Tutorials :
    - Bad programming practices in : C
    - C\C++ Tips
    (constrcutive criticism is very welcome)


    - Brain Cell

  3. #3
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    if balance < 0 then don't withdraw, else do it.

    ta-da!

  4. #4
    former member Brain Cell's Avatar
    Join Date
    Feb 2004
    Posts
    472
    or maybe he forgot to use a 'break'
    My Tutorials :
    - Bad programming practices in : C
    - C\C++ Tips
    (constrcutive criticism is very welcome)


    - Brain Cell

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > i need your help asap!!!!!!
    Yeah, I'm sure (read the SIG)

    Post your actual code, not some mangled pseudo-code of what you think you're doing.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Assembly amature question: prog errors
    By geek@02 in forum Tech Board
    Replies: 1
    Last Post: 10-03-2008, 01:35 PM
  2. need help making a dot bounce up and down y axis in this prog
    By redwing26 in forum Game Programming
    Replies: 10
    Last Post: 08-05-2006, 12:48 PM
  3. Getting input from another prog?
    By Badman3k in forum C Programming
    Replies: 4
    Last Post: 11-11-2004, 02:58 AM
  4. ATM prog
    By giovs in forum C Programming
    Replies: 1
    Last Post: 10-12-2004, 08:06 AM
  5. YangHui triangle print test prog?
    By toysoldier in forum C++ Programming
    Replies: 8
    Last Post: 08-20-2004, 08:46 AM