Advertisement
ivanov_ivan

ImpressTheGirlfriend

Nov 28th, 2015
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.78 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication1
  8. {
  9.     class ImpressTheGirlfriend
  10.     {
  11.         static void Main()
  12.         {
  13.             decimal r = decimal.Parse(Console.ReadLine());
  14.             decimal d = decimal.Parse(Console.ReadLine());
  15.             decimal e = decimal.Parse(Console.ReadLine());
  16.             decimal b = decimal.Parse(Console.ReadLine());
  17.             decimal m = decimal.Parse(Console.ReadLine());
  18.                 r = r / 100 * 3.5M;
  19.                 d = d * 1.5M;
  20.                 e = e * 1.95M;
  21.                 b = b / 2;
  22.  
  23.             Console.WriteLine("{0:f2}" , Math.Ceiling(Math.Max(Math.Max(r , Math.Max(d , m)) , Math.Max(e , b))));
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement