Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace IFelse
- {
- class Program
- {
- static void Main(string[] args)
- {
- string pizza = Console.ReadLine();
- string desert = Console.ReadLine();
- int brpizza = int.Parse(Console.ReadLine());
- double money = 0.0;
- /* if (pizza == "Small")
- {
- money = 9.98 * brpizza;
- }
- else if (pizza == "Medium")
- {
- money = 18.99 * brpizza;
- }
- else if (pizza == "Large")
- {
- money = 25.98 * brpizza;
- }
- else if (pizza == "ExtraLarge")
- {
- money = 35.99 * brpizza;
- }*/
- switch (pizza)
- {
- case "Small":
- money = 9.98 * brpizza;
- break;
- case "Medium":
- money = 18.99 * brpizza;
- break;
- case "Large":
- money = 25.98 * brpizza;
- break;
- case "ExtraLarge":
- money = 35.99 * brpizza;
- break;
- }
- if (desert == "yes")
- {
- // money = money + 5;
- money += 5;
- if (money > 50)
- {
- money = money - 0.10 * money;
- }
- else if (money > 25)
- {
- money = money - 0.07 * money;
- }
- else if (money > 15)
- {
- money = money - 0.05 * money;
- }
- }
- Console.WriteLine($"{money:F2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement