nvnnaidenov

VegetableMarket - Chapter 2.1

Feb 9th, 2022
1,272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. //Task 002, Chapter 2.1
  2. using System;
  3.  
  4. public class VegetableMarket
  5. {
  6.     static void Main()
  7.     {
  8.         double vegetablePrice = double.Parse(Console.ReadLine());
  9.         double fruidPrice = double.Parse(Console.ReadLine());
  10.         int vegetableWeight = int.Parse(Console.ReadLine());
  11.         int fruidWeight = int.Parse(Console.ReadLine());
  12.  
  13.         double total = (vegetablePrice * vegetableWeight + fruidPrice * fruidWeight) / 1.94;
  14.  
  15.         Console.WriteLine(total);
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment