Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Transport
- {
- class Program
- {
- static void Main(string[] args)
- {
- var n = double.Parse(Console.ReadLine());
- var part = Console.ReadLine();
- if (n < 20 && part == "day")
- {
- Console.WriteLine((n * 0.79) + 0.70);
- }
- else if (n < 20 && part == "night")
- {
- Console.WriteLine((n * 0.90) + 0.70);
- }
- else if (n >= 20 && n < 100)
- {
- Console.WriteLine(n * 0.09);
- }
- else if (n >= 100)
- {
- Console.WriteLine(n * 0.06);
- }
- else
- {
- Console.WriteLine("Incorrect input");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment