October 1st, 2011, 06:13 PM
[RESOLVED] C# Loop Help :$
Ernesto’s Eggs has different wholesale prices for their eggs, based upon the number sold:
0 up to but not including 4 dozen $0.50 per dozen
4 up to but not including 6 dozen $0.45 per dozen
6 up to but not including 11 dozen $0.40 per dozen
11 or more dozen $0.35 per dozen
Extra eggs are priced at 1/12 the per dozen price
a) Write a program that asks the user for the number of eggs, and then calculates the bill. The program output should look similar to:
Enter number of eggs: 126
Your cost is $0.40 per dozen or 0.033 per egg.
Your bill comes to $4.20
b) A computer is not always available, so Mr. Ernesto would like a chart showing the price for any number of eggs up to 120. Write a program that displays a chart similar to:
Basically thats the question im suppose to solve. I created the part A program, but Im lost as to what i should do for the part B program. I know its probably simple, but im a new student.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!