Advertisement
Spocoman

Fish Land

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