Advertisement
zdravko7

Exam 29 March 2015 Evening Ex_1

Mar 29th, 2015
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.76 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. class One
  6. {
  7.     static void Main()
  8.     {
  9.         double[] input = new double[5];
  10.  
  11.         for (int i = 0; i < input.Length; i++)
  12.         {
  13.             input[i] = double.Parse(Console.ReadLine());
  14.         }
  15.  
  16.         double rubles = input[0];
  17.         double dollars = input[1];
  18.         double euros = input[2];
  19.         double specialOffer = input[3];
  20.         double mSite = input[4];
  21.  
  22.         double[] prices = new double[5];
  23.  
  24.         prices[0] = ((rubles / 100) * 3.5);
  25.         prices[1] = (dollars * 1.5);
  26.         prices[2] = (euros * 1.95);
  27.         prices[3] = (specialOffer / 2);
  28.         prices[4] = mSite;
  29.  
  30.         Console.WriteLine("{0:0.00}", prices.Min());        
  31.  
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement