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 ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- //Input
- double days = double.Parse(Console.ReadLine());
- string destination = Console.ReadLine();
- string typeRoom = Console.ReadLine();
- double TOTAL = 0;
- //If-Statements
- if (destination == "Borovets")
- {
- if (typeRoom == "double")
- {
- TOTAL = 38 * days;
- }
- else if (typeRoom == "apartment")
- {
- TOTAL = 45 * days;
- }
- }
- else if (destination == "Bansko")
- {
- if (typeRoom == "double")
- {
- TOTAL = 35 * days;
- }
- else if (typeRoom == "apartment")
- {
- TOTAL = 42 * days;
- }
- }
- else if (destination == "Pamporovo")
- {
- if (typeRoom == "double")
- {
- TOTAL = 39 * days;
- }
- else if (typeRoom == "apartment")
- {
- TOTAL = 49 * days;
- }
- }
- if (days > 10)
- {
- TOTAL = TOTAL * 0.85;
- }
- Console.WriteLine($"They have to spend {TOTAL:F2} leva.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement