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