Spocoman

06. Fishland

Nov 15th, 2021 (edited)
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 KB | None | 0 0
  1. using System;
  2.  
  3.  
  4. namespace FishMarket
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             double mackerelPrice = double.Parse(Console.ReadLine());
  11.             double spratPrice = double.Parse(Console.ReadLine());
  12.             double bonitoFishKg = double.Parse(Console.ReadLine());
  13.             double saffronKg = double.Parse(Console.ReadLine());
  14.             double shellKg = double.Parse(Console.ReadLine());
  15.  
  16.             double bonitoFishSum = bonitoFishKg * mackerelPrice * 1.60;
  17.             double saffronSum = saffronKg * spratPrice * 1.80;
  18.             double shellSum = shellKg * 7.50;
  19.             double sum = bonitoFishSum + saffronSum + shellSum;
  20.            
  21.             Console.WriteLine($"{sum:F2}");
  22.         }
  23.     }
  24. }
Add Comment
Please, Sign In to add comment