Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Runtime.Remoting.Channels;
- namespace ConsoleApplication
- {
- internal class Program
- {
- public static void Main(string[] args)
- {
- var hrizantemi = decimal.Parse(Console.ReadLine());
- var roze = decimal.Parse(Console.ReadLine());
- var laleta = decimal.Parse(Console.ReadLine());
- var seacon = Console.ReadLine();
- var happyDay = Console.ReadLine();
- decimal total = 0;
- if (seacon == "Spring")
- {
- total = hrizantemi * (decimal) 2 + roze * (decimal) 4.10 + laleta * (decimal) 2.5;
- if (happyDay == "Y")
- {
- total *= (decimal) 1.15;
- }
- if (laleta > 7)
- {
- total *= (decimal) 0.95;
- }
- if (hrizantemi + roze + laleta > 20)
- {
- total *= (decimal) 0.8;
- }
- }
- else if (seacon == "Winter")
- {
- total = hrizantemi * (decimal) 3.75 + roze * (decimal) 4.5+ laleta * (decimal) 4.15;
- if (happyDay == "Y")
- {
- total *= (decimal) 1.15;
- }
- if (roze > 10)
- {
- total *= (decimal) 0.9;
- }
- if (hrizantemi + roze + laleta > 20)
- {
- total *= (decimal) 0.8;
- }
- }
- else if (seacon == "Autumn")
- {
- total = hrizantemi * (decimal) 3.75 + roze * (decimal) 4.5+ laleta * (decimal) 4.15;
- if (happyDay == "Y")
- {
- total *= (decimal) 1.15;
- }
- if (hrizantemi + roze + laleta > 20)
- {
- total *= (decimal) 0.8;
- }
- }
- else
- {
- total = hrizantemi * (decimal) 2 + roze * (decimal) 4.10 + laleta * (decimal) 2.5;
- if (happyDay == "Y")
- {
- total *= (decimal) 1.15;
- }
- if (hrizantemi + roze + laleta > 20)
- {
- total *= (decimal) 0.8;
- }
- }
- Console.WriteLine("{0:f2}", total + 2);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement