-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPool Day.cs
More file actions
28 lines (21 loc) · 836 Bytes
/
Copy pathPool Day.cs
File metadata and controls
28 lines (21 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
namespace Pool_day
{
class Program
{
static void Main(string[] args)
{
double people = double.Parse(Console.ReadLine());
double tax = double.Parse(Console.ReadLine());
double lounge = double.Parse(Console.ReadLine());
double umbrella = double.Parse(Console.ReadLine());
double total_tax = people * tax;
double total_umbrellas = Math.Ceiling(people / 2);
double umbrellas_cost = total_umbrellas * umbrella;
double total_lounge = Math.Ceiling(people * 0.75);
double lounge_cost = total_lounge * lounge;
double total = total_tax + umbrellas_cost + lounge_cost;
Console.WriteLine("{0:f2} lv.", total);
}
}
}