Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.78 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 VeggieFruits
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var priceVeggie = Double.Parse(Console.ReadLine());
  14.             var priceFruit = Double.Parse(Console.ReadLine());
  15.             int kiloVeggie = int.Parse(Console.ReadLine());
  16.             int kiloFriut = int.Parse(Console.ReadLine());
  17.  
  18.            
  19.  
  20.             var revVeggie = priceVeggie * kiloVeggie;
  21.             var revFruit = priceFruit * kiloFriut;
  22.             double revTotal = revVeggie + revFruit;
  23.             double revEur = Math.Round(revTotal / 1.94, 2);
  24.             Console.WriteLine(revEur);
  25.  
  26.                                          
  27.  
  28.  
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement