Spocoman

04. Vegetable Market

Nov 15th, 2021 (edited)
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Farm
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             double vegetablesBg = double.Parse(Console.ReadLine());
  11.             double fruitsBg = double.Parse(Console.ReadLine());
  12.             double vegetablesKg = double.Parse(Console.ReadLine());
  13.             double fruitsKg = double.Parse(Console.ReadLine());
  14.             double results =(((vegetablesBg * vegetablesKg) + (fruitsBg * fruitsKg)) / 1.94);
  15.             Console.WriteLine($"{results:f2}");
  16.         }
  17.  
  18.     }
  19. }
Add Comment
Please, Sign In to add comment