Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace exampreparation
- {
- class Program
- {
- static void Main(string[] args)
- {
- int peopleCount = int.Parse(Console.ReadLine());
- double entrance = double.Parse(Console.ReadLine());
- double sunbedPrice = double.Parse(Console.ReadLine());
- double umbrellaPrice = double.Parse(Console.ReadLine());
- double entranceMoney = peopleCount * entrance;
- double sunbedMoney = Math.Ceiling(peopleCount * 0.75 ) * sunbedPrice;
- double umbrellaMoney = Math.Ceiling(peopleCount * 0.50 ) * umbrellaPrice;
- double allMoney = entranceMoney + sunbedMoney + umbrellaMoney;
- Console.WriteLine($"{allMoney:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement