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 CurrencyCheck
- {
- class CurrencyCheck
- {
- static void Main(string[] args)
- {
- double rubles = double.Parse(Console.ReadLine());
- double dollars = double.Parse(Console.ReadLine());
- double euro = double.Parse(Console.ReadLine());
- double levaB = double.Parse(Console.ReadLine());
- double levaM = double.Parse(Console.ReadLine());
- decimal priceInRublles = (decimal)((rubles / 100.00) * 3.50);
- decimal priceInEuro = (decimal)(euro * 1.95);
- decimal priceInDollars = (decimal)(dollars * 1.50);
- decimal priceInLevaB = (decimal)(levaB / 2.00);
- decimal priceInLevaM = (decimal)(levaB);
- decimal minPrice = decimal.MaxValue;
- if (priceInRublles < minPrice) minPrice = priceInRublles;
- if (priceInDollars < minPrice) minPrice = priceInDollars;
- if (priceInEuro < minPrice) minPrice = priceInEuro;
- if (priceInLevaB < minPrice) minPrice = priceInLevaB;
- if (priceInLevaM < minPrice) minPrice = priceInLevaM;
- Console.WriteLine("{0:F2}",minPrice);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement