Thread: I need to write a program !!!

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    5

    Question I need to write a program !!!

    I don't knwo how to start.....

    * a program that a bank employee can run to generate a report to send to the home office. The employee will enter the current bank balance for each customer. The report should classify customers as "Regular", "Special", or "VIP" according to their bank balance. A customer with less than $ 10,000 is "Regular". Customer who has between $10,000 and $50,000 is "Special" and a customer with more than $50, 000 is a "VIP".

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Quote Originally Posted by alone2002dj View Post
    I don't knwo how to start.....

    * a program that a bank employee can run to generate a report to send to the home office. The employee will enter the current bank balance for each customer. The report should classify customers as "Regular", "Special", or "VIP" according to their bank balance. A customer with less than $ 10,000 is "Regular". Customer who has between $10,000 and $50,000 is "Special" and a customer with more than $50, 000 is a "VIP".
    A good way to start is just working the problem through first, by hand, with paper and pencil. You have to know what you're doing step by step, before you can code it for the computer.
    Note each step and put it down into one of three basic functions: Input, Processing, and Output.

    Now work up a step by step pseudo code in semi-english (whatever your primary language is), that can easily be altered into C code, later.
    Code:
    for each customer
       enter their bank balance
       If (balance < 10000)
           print "Regular" 
       elseif (balance > 10000 && balance < 50000)
           print "Special"
       else 
           print VIP
       print "customer" and newline
    While working on your pseudo code, don't worry about proper syntax for C, but do make your indentation show what the program flow of execution, will be.

    Now refine your pseudo code, statement by statement, in valid C code, testing as you go with the compiler. Be sure your compiler's warning on turned on, and if you see an error or warning STOP and fix it. Nothing's worse than to have a whole program, which won't compile, and gives hundreds of errors.

    For any further help, post your code, and tell us exactly what the problems are. We answer questions relating to C code, but we're not homework "dogs".

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie needs help..
    By xpress urself in forum C++ Programming
    Replies: 3
    Last Post: 07-26-2007, 07:22 PM
  2. how could i write this program: cat < apa | wc | wc > bepa
    By strugglingman in forum C Programming
    Replies: 2
    Last Post: 04-26-2006, 04:40 PM
  3. Is there another way to write this program?
    By agentxx04 in forum C Programming
    Replies: 1
    Last Post: 11-23-2004, 09:28 PM
  4. Replies: 1
    Last Post: 10-13-2004, 12:15 PM
  5. Challenge to write a program
    By Twisted.alice in forum A Brief History of Cprogramming.com
    Replies: 40
    Last Post: 05-15-2003, 12:00 PM