SHARE
TWEET
Choose A Drink 2.0
a guest
Jan 29th, 2018
53
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- using System;
- namespace ChooseDrink2
- {
- class Program
- {
- public static void Main(string[] args)
- {
- string profession=Console.ReadLine();
- int quantity = int.Parse(Console.ReadLine());
- decimal price=0.00m;
- switch (profession)
- {
- case "Athlete":
- price=quantity*0.70m;
- Console.WriteLine("The {0} has to pay {1}.",profession, price);
- break;
- case "Businessman":
- price=quantity*1.00m;
- Console.WriteLine("The {0} has to pay {1}.", profession, price);
- break;
- case "Businesswoman":
- price=quantity*1.00m;
- Console.WriteLine("The {0} has to pay {1}.", profession, price);
- break;
- case "Softuni Student":
- price=quantity*1.70m;
- Console.WriteLine("The {0} has to pay {1}.", profession, price);
- break;
- default:
- price=quantity*1.20m;
- Console.WriteLine("The {0} has to pay {1}.", profession, price);
- break;
- }
- Console.Write("Press any key to continue . . . ");
- Console.ReadKey(true);
- }
- }
- }
RAW Paste Data

