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 _18.Transport
- {
- class Program
- {
- static void Main(string[] args)
- {
- var n = double.Parse(Console.ReadLine());
- string time = Console.ReadLine();
- if (time == "day")
- {
- if (n >= 100 && n <= 5000)
- {
- Console.WriteLine((180 * 0.06));
- }
- else if (n >= 20)
- {
- Console.WriteLine(n * 0.09);
- }
- else if (n>=1)
- {
- Console.WriteLine(0.70 + (n * 0.79));
- }
- }
- else if (time == "night")
- {
- if (n >= 100 && n<=5000)
- {
- Console.WriteLine((180 * 0.06));
- }
- else if (n >= 20)
- {
- Console.WriteLine(n * 0.09);
- }
- else if (n >= 1)
- {
- Console.WriteLine(0.70 + (n * 0.90));
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment