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 Problem1
- {
- class Problem1
- {
- static void Main(string[] args)
- {
- string text = Console.ReadLine();
- double n = double.Parse(Console.ReadLine());
- double testStudio = 0;
- double testStudio2 = 0;
- double testApartament = 0;
- double testApartament2 = 0;
- if (text == "May" || text == "October")
- {
- if (n >= 7 && n < 14)
- {
- testStudio = 50 * 0.95;
- Console.WriteLine("Studio: {0:F2} lv.", testStudio);
- }
- else if (n >= 14)
- {
- testApartament = 65 * 0.9;
- testApartament2 = testApartament * n;
- Console.WriteLine("Apartment: {0:F2} lv.", testApartament2);
- testStudio = 50 * 0.7;
- testStudio2 = testStudio * n;
- Console.WriteLine("Studio: {0:F2} lv.", testStudio2);
- }
- }
- else if (text == "June" || text == "September")
- {
- //if (n >= 7 && n < 14)
- //{
- // testStudio = 75.20 * 0.95;
- // testStudio2 = testStudio * n;
- // Console.WriteLine("Studio: {0:F2} lv.", testStudio2);
- //}
- if (n >= 14)
- {
- testApartament = 68.70 * 0.9;
- testApartament2 = testApartament * n;
- Console.WriteLine("Apartment: {0:F2} lv.", testApartament2);
- testStudio = 75.20 * 0.8;
- testStudio2 = testStudio * n;
- Console.WriteLine("Studio: {0:F2} lv.", testStudio2);
- }
- }
- else if (text == "Juli" || text == "August")
- {
- if (n >= 7 && n < 14)
- {
- testStudio = 76 * 0.95;
- Console.WriteLine("Studio: {0:F2} lv.", testStudio);
- }
- else if (n >= 14)
- {
- testApartament = 77 * 0.9;
- testApartament2 = testApartament * n;
- Console.WriteLine("Apartment: {0:F2} lv.", testApartament2);
- testStudio = 76 * n;
- Console.WriteLine("Studio: {0:F2} lv.", testStudio);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement