Originally Posted by
alone2002dj
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".