Guest User

Untitled

a guest
Jun 21st, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.65 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _18.Transport
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var n = double.Parse(Console.ReadLine());
  14.            
  15.  
  16.             string time = Console.ReadLine();
  17.             if (time == "day")
  18.             {
  19.                 if (n >= 100 && n <= 5000)
  20.                 {
  21.                     Console.WriteLine((180 * 0.06));
  22.                 }
  23.  
  24.                 else if (n >= 20)
  25.                 {
  26.                     Console.WriteLine(n * 0.09);
  27.                 }
  28.  
  29.                 else if (n>=1)
  30.                 {
  31.                     Console.WriteLine(0.70 + (n * 0.79));
  32.                 }
  33.                 
  34.                 
  35.                 
  36.                 
  37.             }
  38.             else if (time == "night")
  39.             {
  40.                 if (n >= 100 && n<=5000)
  41.                 {
  42.                     Console.WriteLine((180 * 0.06));
  43.                 }
  44.  
  45.                 else if (n >= 20)
  46.                 {
  47.                     Console.WriteLine(n * 0.09);
  48.                 }
  49.  
  50.                 else if (n >= 1)
  51.                 {
  52.                     Console.WriteLine(0.70 + (n * 0.90));
  53.                 }
  54.  
  55.             }
  56.             
  57.         }
  58.     }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment