Advertisement
Spocoman

Pool Day

Nov 25th, 2021
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1. using System;
  2.  
  3. namespace PoolDay
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double people = double.Parse(Console.ReadLine());
  10.             double entrance = double.Parse(Console.ReadLine());
  11.             double deskChair = double.Parse(Console.ReadLine());
  12.             double umbrella = double.Parse(Console.ReadLine());
  13.  
  14.             double entrancePrice = people * entrance;
  15.             double deskChairPrice = Math.Ceiling(people * 0.75) * deskChair;
  16.             double umbrellaPrice = Math.Ceiling(people / 2) * umbrella;
  17.  
  18.             Console.WriteLine($"{entrancePrice + deskChairPrice + umbrellaPrice:F2} lv.");
  19.  
  20.         }
  21.     }
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement