c sharp - TechRepublic
General discussion
October 20, 2004 at 09:40 AM
overload

c sharp

by overload . Updated 21 years, 8 months ago

This should be a simple problem. I’m working in console only and its a carpet calculator. I have the calculations for the carpet prices complete. I need to add in styles in a switch case. Like Console.Write(“(1) Berber (2) Plush”) all the way up to six different styles.

On the console you would type #1 and it will repeat the desired selection and price quote. If by accident you typed an A or a #9 then it would state on the console “You have selected the wrong number” Now if the number entered is right then it will start the calculations.

From what I understand I need a “switch and case statement”. “I need a bool, I need a If else and a do while statement.” in addition to my calculations. This is in c #.

This discussion is locked

All Comments