Advertisement
VladoG

[PB] TEST-Exam 2017-03-11- 01-Fishland

Mar 12th, 2017
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.92 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 _01_Fishland_2016
  8.     {
  9.     class ProgramFishland
  10.         {
  11.         static void Main(string[] args)
  12.             {
  13.             decimal skumriaPrice = decimal.Parse(Console.ReadLine());
  14.             decimal cacaPrice = decimal.Parse(Console.ReadLine());
  15.             decimal palamud = decimal.Parse(Console.ReadLine());
  16.             decimal safrid = decimal.Parse(Console.ReadLine());
  17.             decimal midi = decimal.Parse(Console.ReadLine());
  18.  
  19.             decimal palamudPrice = skumriaPrice * 1.6m;
  20.             decimal safridPrice = cacaPrice * 1.8m;
  21.             decimal midiPrice = 7.50m;
  22.  
  23.             decimal sum = palamud * palamudPrice + safrid * safridPrice + midi * midiPrice;
  24.             sum = Math.Round(sum, 2);
  25.  
  26.             Console.WriteLine(sum);
  27.             }
  28.         }
  29.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement