Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Fishland
- {
- class Program
- {
- static void Main(string[] args)
- {
- string month = Console.ReadLine();
- int spendHours = int.Parse(Console.ReadLine());
- int people = int.Parse(Console.ReadLine());
- string timeOfDay = Console.ReadLine();
- double price = 0;
- if (month == "march" || month == "april" || month == "may")
- {
- if (timeOfDay == "day")
- {
- price = spendHours * people * 10.50;
- }
- else if (timeOfDay == "night")
- {
- price = spendHours * people * 8.40;
- }
- }
- else if (month == "jun" || month == "july" || month == "august")
- {
- if (timeOfDay == "day")
- {
- price = spendHours * people * 12.60;
- }
- else if (timeOfDay == "night")
- {
- price = spendHours * people * 10.20;
- }
- }
- if (people <= 5)
- {
- price = price * 0.1;
- }
- Console.WriteLine($"Price per person for one hour: {price}");
- }
- }
- }
- //march
- //3
- //3
- //day
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement