Advertisement
Niicksana

Fishland

Dec 11th, 2017
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 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 _1.Fishland
  8. {
  9.     class Fishland
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             // Exam - 20 November 2016 - Morning
  14.             double mackerel = double.Parse(Console.ReadLine());
  15.             double sprat = double.Parse(Console.ReadLine());
  16.             double bonito = double.Parse(Console.ReadLine());
  17.             double horseМackerel = double.Parse(Console.ReadLine());
  18.             double mussels = double.Parse(Console.ReadLine());
  19.  
  20.             double priceBonito = mackerel + mackerel * 0.60;
  21.             double priceHorseMackerel = sprat + sprat * 0.80;
  22.             double priceMussels = mussels * 7.50;
  23.  
  24.             double totalPrice = bonito * priceBonito + horseМackerel * priceHorseMackerel + priceMussels;
  25.  
  26.             Console.WriteLine("{0:f2}", totalPrice);
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement