Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.86 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 _01.VegetableMarket
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var priceFor1KiloVegetables = double.Parse(Console.ReadLine());
  14.             var priceFor1KiloFruits = double.Parse(Console.ReadLine());
  15.             var totalKilosOfVegetables = int.Parse(Console.ReadLine());
  16.             var totalKilosOfFruits = int.Parse(Console.ReadLine());
  17.  
  18.             var priceOfVegetables = priceFor1KiloVegetables * totalKilosOfVegetables;
  19.             var priceOfFruits = priceFor1KiloFruits * totalKilosOfFruits;
  20.             var totalPriceBGN = priceOfVegetables + priceOfFruits;
  21.             var totalPriceEURO = totalPriceBGN / 1.94;
  22.             Console.WriteLine(totalPriceEURO);
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement