ulvis.paste.net

Paste Search Dynamic
Recent pastes
double.Parse
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace exam
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             double priceOfWiskey = double.Parse(Console.ReadLine());
  14.             double volumeOfWater = double.Parse(Console.ReadLine());
  15.             double volumeOfWine = double.Parse(Console.ReadLine());
  16.             double volumeOfShamp = double.Parse(Console.ReadLine());
  17.             double volumeOfWiskey = double.Parse(Console.ReadLine());
  18.  
  19.             double priceOfShamp = priceOfWiskey * 0.5;
  20.             double priceOfWine = priceOfShamp * 0.4;
  21.             double priceOfWater = priceOfShamp * 0.1;
  22.  
  23.             double sumOfShamp = volumeOfShamp * priceOfShamp;
  24.             double sumOfWine = volumeOfWine * priceOfWine;
  25.             double sumOfWater = volumeOfWater * priceOfWater;
  26.             double sumOfWiskey = volumeOfWiskey * priceOfWiskey;
  27.  
  28.             double sum = sumOfShamp + sumOfWine + sumOfWater + sumOfWiskey;
  29.  
  30.             Console.WriteLine($"{sum:f2}");
  31.  
  32.  
  33.  
  34.         }
  35.     }
  36. }
Parsed in 0.007 seconds