Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ChooseADrink2._0
- {
- class Program
- {
- static void Main(string[] args)
- {
- var profession = Console.ReadLine();
- var quantity = double.Parse(Console.ReadLine());
- var totalPrize = 0.0;
- var drink = string.Empty;
- if (profession == "Athlete")
- {
- drink = "Water";
- totalPrize += 0.7;
- }
- else if (profession == "Businessman" || profession == "Businesswoman")
- {
- drink = "Coffee";
- totalPrize += 1.00;
- }
- else if (profession == "SoftUni Student")
- {
- drink = "Beer";
- totalPrize += 1.7;
- }
- else
- {
- drink = "Tea";
- totalPrize += 1.2;
- }
- var FinalPrize = totalPrize * quantity;
- Console.WriteLine($"The {profession} has to pay {FinalPrize:f2}.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement