Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace PasswordGenerator
- {
- class Program
- {
- static void Main(string[] args)
- {
- string typeOfSushi = Console.ReadLine();
- string nameOfRestorant = Console.ReadLine();
- int numberOfPieces = int.Parse(Console.ReadLine());
- string order = Console.ReadLine();
- switch (typeOfSushi)
- {
- case "sashimi":
- if (nameOfRestorant == "Sushi Zone")
- {
- double price = numberOfPieces * 4.99;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- else if (nameOfRestorant == "Sushi Time")
- {
- double price = numberOfPieces * 5.49;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- else if (nameOfRestorant == "Sushi Bar")
- {
- double price = numberOfPieces * 5.25;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- else if (nameOfRestorant == "Asian Pub")
- {
- double price = numberOfPieces * 4.99;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- else
- {
- Console.WriteLine($"{nameOfRestorant} is invalid restaurant!");
- }
- break;
- case "maki":
- if (nameOfRestorant == "Sushi Zone")
- {
- double price = numberOfPieces * 5.29;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- else if (nameOfRestorant == "Sushi Time")
- {
- double price = numberOfPieces * 4.69;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- else if (nameOfRestorant == "Sushi Bar")
- {
- double price = numberOfPieces * 5.55;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- else if (nameOfRestorant == "Asian Pub")
- {
- double price = numberOfPieces * 4.80;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- else
- {
- Console.WriteLine($"{nameOfRestorant} is invalid restaurant!");
- }
- break;
- case "uramaki":
- if (nameOfRestorant == "Sushi Zone")
- {
- double price = numberOfPieces * 5.99;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- else if (nameOfRestorant == "Sushi Time")
- {
- double price = numberOfPieces * 4.49;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- else if (nameOfRestorant == "Sushi Bar")
- {
- double price = numberOfPieces * 6.25;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- else if (nameOfRestorant == "Asian Pub")
- {
- double price = numberOfPieces * 5.50;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- else
- {
- Console.WriteLine($"{nameOfRestorant} is invalid restaurant!");
- }
- break;
- case "temaki":
- if (nameOfRestorant == "Sushi Zone")
- {
- double price = numberOfPieces * 4.29;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- else if (nameOfRestorant == "Sushi Time")
- {
- double price = numberOfPieces * 5.19;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- else if (nameOfRestorant == "Sushi Bar")
- {
- double price = numberOfPieces * 4.75;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- else if (nameOfRestorant == "Asian Pub")
- {
- double price = numberOfPieces * 5.50;
- if (order == "Y")
- {
- double totalPrice = Math.Ceiling(price * 0.20 + price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- else
- {
- double totalPrice = Math.Ceiling(price);
- Console.WriteLine($"Total price: {totalPrice} lv.");
- }
- }
- break;
- default:
- Console.WriteLine($"{nameOfRestorant} is invalid restaurant!");
- break;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement