Advertisement
Guest User

01. Currency Check

a guest
Mar 30th, 2015
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. class Program
  5. {
  6.     static void Main()
  7.     {
  8.         decimal rubble = decimal.Parse(Console.ReadLine());
  9.         decimal dollar = decimal.Parse(Console.ReadLine()) *1.5m;
  10.         decimal euro = decimal.Parse(Console.ReadLine()) * 1.95m;
  11.         decimal bOfferInLeva = decimal.Parse(Console.ReadLine());
  12.         decimal MsiteOfferInLeva = decimal.Parse(Console.ReadLine());
  13.         rubble = (rubble / 100) * 3.5m;
  14.         bOfferInLeva /= 2;
  15.         decimal lowestPrice = Math.Min(Math.Min(rubble, dollar), Math.Min(euro, bOfferInLeva));
  16.         lowestPrice = Math.Min(lowestPrice, MsiteOfferInLeva);
  17.         Console.WriteLine("{0:f2}",lowestPrice);
  18.  
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement