Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace nestedConstructions
- {
- class Program
- {
- static void Main(string[] args)
- {
- int days = int.Parse(Console.ReadLine());
- string typeRoom = Console.ReadLine();
- string feedback = Console.ReadLine();
- double total = 0;
- if (typeRoom == "room for one person")
- {
- total = days * 18;
- }
- else if (typeRoom == "apartment")
- {
- total = days * 25;
- if (days < 10)
- {
- total -= total * 0.30;
- }
- else if (days >= 10 && days <= 15)
- {
- total -= total * 0.35;
- }
- else if (days > 15)
- {
- total -= total * 0.50;
- }
- }
- else if (typeRoom == "president apartment")
- {
- total = days * 35;
- if (days < 10)
- {
- total -= total * 0.10;
- }
- else if (days >= 10 && days <= 15)
- {
- total -= total * 0.15;
- }
- else if (days > 15)
- {
- total -= total * 0.20;
- }
- }
- if (feedback == "positive")
- {
- total += total * 0.25;
- }
- else if (feedback == "negative")
- {
- total -= total * 0.10;
- }
- Console.WriteLine("{0:f2}", total);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement