Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Harder_checks
- {
- class Program
- {
- static void Main(string[] args)
- {
- string product = Console.ReadLine();
- string city = Console.ReadLine();
- int quantity = int.Parse(Console.ReadLine());
- double price = 0;
- if ((product == "coffee") && (city == "Sofia"))
- {
- price = 0.5;
- Console.WriteLine(quantity * price);
- }
- if ((product == "coffee") && (city == "Plovdiv"))
- {
- price = 0.4;
- Console.WriteLine(quantity * price);
- }
- if ((product == "coffee") && (city == "Varna"))
- {
- price = 0.45;
- Console.WriteLine(quantity * price);
- }
- if ((product == "water") && (city == "Sofia"))
- {
- price = 0.8;
- Console.WriteLine(quantity * price);
- }
- if ((product == "water") && (city == "Plovdiv"))
- {
- price = 0.7;
- Console.WriteLine(quantity * price);
- }
- if ((product == "water") && (city == "Varna"))
- {
- price = 0.7;
- Console.WriteLine(quantity * price);
- }
- if ((product == "beer") && (city == "Sofia"))
- {
- price = 1.2;
- Console.WriteLine(quantity * price);
- }
- if ((product == "beer") && (city == "Plovdiv"))
- {
- price = 1.15;
- Console.WriteLine(quantity * price);
- }
- if ((product == "beer") && (city == "Varna"))
- {
- price = 1.1;
- Console.WriteLine(quantity * price);
- }
- if ((product == "sweets") && (city == "Sofia"))
- {
- price = 1.45;
- Console.WriteLine(quantity * price);
- }
- if ((product == "sweets") && (city == "Plovdiv"))
- {
- price = 1.3;
- Console.WriteLine(quantity * price);
- }
- if ((product == "sweets") && (city == "Varna"))
- {
- price = 1.35;
- Console.WriteLine(quantity * price);
- }
- if ((product == "peanuts") && (city == "Sofia"))
- {
- price = 1.6;
- Console.WriteLine(quantity * price);
- }
- if ((product == "peanuts") && (city == "Plovdiv"))
- {
- price = 1.5;
- Console.WriteLine(quantity * price);
- }
- if ((product == "peanuts") && (city == "Varna"))
- {
- price = 1.55;
- Console.WriteLine(quantity * price);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement