using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp8 { class Program { static void Main(string[] args) { decimal cenapizzy = 20m; Console.WriteLine("Cena podstawowa pizzy to {0}", cenapizzy); Console.WriteLine("Jaki chcesz dodatek? Wybierz spośród: pomidor / cebula/ oliwki"); string dodatek = Console.ReadLine(); switch (dodatek) { case "pomidor": cenapizzy = cenapizzy + 5; Console.WriteLine("Cena z dodatkiem to {0}", cenapizzy); break; case "cebula": cenapizzy += 5; Console.WriteLine("Cena z dodatkiem to {0}", cenapizzy); break; case "oliwki": cenapizzy += 9; Console.WriteLine("Cena z dodatkiem to {0}", cenapizzy); break; default: Console.WriteLine("Wybrałeś zły dodatek"); break; } Console.WriteLine("Czy chcesz napoj? (t/n)"); char wybor = char.Parse(Console.ReadLine()); switch (wybor) { case 't': cenapizzy += 3; Console.WriteLine("Cena pizzy z napojem to {0}", cenapizzy); break; case 'n': Console.WriteLine("Nie wybrałeś napoju"); break; default: Console.WriteLine("Wpisałeś złą literkę"); break; } Console.ReadKey(); } } }