Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _3
- {
- class Program
- {
- static void Main(string[] args)
- {
- string country = Console.ReadLine();
- string dates = Console.ReadLine();
- int nights = int.Parse(Console.ReadLine());
- double sum = 0;
- double nightPrice = 0;
- if (country == "France")
- {
- if (dates == "21-23")
- {
- nightPrice = 30;
- sum = nightPrice * nights;
- }
- else if (dates == "24-27")
- {
- nightPrice = 35;
- sum = nightPrice * nights;
- }
- else if (dates == "28-31")
- {
- nightPrice = 40;
- sum = nightPrice * nights;
- }
- }
- else if (country == "Italy")
- {
- if (dates == "21-23")
- {
- nightPrice = 28;
- sum = nightPrice * nights;
- }
- else if (dates == "24-27")
- {
- nightPrice = 32;
- sum = nightPrice * nights;
- }
- else if (dates == "28-31")
- {
- nightPrice = 39;
- sum = nightPrice * nights;
- }
- }
- else if (country == "Germany")
- {
- if (dates == "21-23")
- {
- nightPrice = 32;
- sum = nightPrice * nights;
- }
- else if (dates == "24-27")
- {
- nightPrice = 37;
- sum = nightPrice * nights;
- }
- else if (dates == "28-31")
- {
- nightPrice = 43;
- sum = nightPrice * nights;
- }
- }
- Console.WriteLine($"Easter trip to {country} : {sum:f2} leva.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement