Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _17.Transport_Price_Past_Paper_Qus
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             var n = double.Parse(Console.ReadLine());
  10.             var timeofday = Console.ReadLine().ToLower();
  11.             if (n<20)
  12.             {
  13.                 if (timeofday=="day")
  14.                 {
  15.                     Console.WriteLine(0.70 + (0.79*n));
  16.                 }
  17.                 else if (timeofday=="night")
  18.                 {
  19.                     Console.WriteLine(0.70 + (0.90 * n));
  20.                 }     
  21.             }
  22.             if (n>=20 && n<100)
  23.             {
  24.                 if (timeofday == "day")
  25.                 {
  26.                     Console.WriteLine(0.09 * n);
  27.                 }
  28.                 else if (timeofday == "night")
  29.                 {
  30.                     Console.WriteLine(0.09 * n);
  31.                 }
  32.             }
  33.             if (n>=100)
  34.             {
  35.                 if (timeofday == "day")
  36.                 {
  37.                     Console.WriteLine(0.06 * n);
  38.                 }
  39.                 else if (timeofday == "night")
  40.                 {
  41.                     Console.WriteLine(0.06 * n);
  42.                 }
  43.             }
  44.         }
  45.     }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement