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 Problem_1___Impress_the_girlfriend
- {
- class Program
- {
- static void Main(string[] args)
- {
- decimal r = decimal.Parse(Console.ReadLine());
- decimal d = decimal.Parse(Console.ReadLine());
- decimal e = decimal.Parse(Console.ReadLine());
- decimal b = decimal.Parse(Console.ReadLine());
- decimal m = decimal.Parse(Console.ReadLine());
- decimal rubles = 3.5M / 100M;
- decimal dollar = 1.5M;
- decimal euro = 1.95M;
- decimal leva = b / 2;
- decimal rublesPrice = r * rubles;
- decimal dollarPrice = d * dollar;
- decimal euroPrice = e * euro;
- decimal levaPrice = leva;
- decimal justLeva = m;
- if (rublesPrice >= rublesPrice && rublesPrice >= dollarPrice && rublesPrice >= euroPrice && rublesPrice >= levaPrice && rublesPrice >= justLeva) Console.WriteLine("{0:f2}", Math.Ceiling(rublesPrice));
- else if (dollarPrice >= rublesPrice && dollarPrice >= dollarPrice && dollarPrice >= euroPrice && dollarPrice >= levaPrice && dollarPrice >= justLeva) Console.WriteLine("{0:f2}", Math.Ceiling(dollarPrice));
- else if (euroPrice >= rublesPrice && euroPrice >= dollarPrice && euroPrice >= euroPrice && euroPrice >= levaPrice && euroPrice >= justLeva) Console.WriteLine("{0:f2}", Math.Ceiling(euroPrice));
- else if (levaPrice >= rublesPrice && levaPrice >= dollarPrice && levaPrice >= euroPrice && levaPrice >= levaPrice && levaPrice >= justLeva) Console.WriteLine("{0:f2}", Math.Ceiling(levaPrice));
- else if (justLeva >= rublesPrice && justLeva >= dollarPrice && justLeva >= euroPrice && justLeva >= levaPrice && justLeva >= justLeva) Console.WriteLine("{0:f2}", Math.Ceiling(justLeva));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement