Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace exampreparation
- {
- class exam
- {
- static void Main(string[] args)
- {
- string projection = Console.ReadLine();
- string food = Console.ReadLine();
- int tickets = int.Parse(Console.ReadLine());
- int price = 0;
- if (projection == "John Wick")
- {
- if (food == "Drink")
- {
- price = 12;
- }
- else if (food == "Popcorn")
- {
- price = 15;
- }
- else
- {
- price = 19;
- }
- }
- else if (projection == "Star Wars")
- {
- if (food == "Drink")
- {
- price = 18;
- }
- else if (food == "Popcorn")
- {
- price = 25;
- }
- else
- {
- price = 30;
- }
- }
- else if (projection == "Jumanji")
- {
- if (food == "Drink")
- {
- price = 9;
- }
- else if (food == "Popcorn")
- {
- price = 11;
- }
- else
- {
- price = 14;
- }
- }
- double sum = price * tickets;
- if (projection == "Star Wars" && tickets >= 4)
- {
- sum *= 0.70;
- }
- if (projection == "Jumanji" && tickets == 2)
- {
- sum *= 0.85;
- }
- Console.WriteLine($"Your bill is {sum:f2} leva.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement