Advertisement
Arxero

Cena za transport

Jul 12th, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 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 _19.Transport_Price
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int n = int.Parse(Console.ReadLine());
  14.             string daytime = (Console.ReadLine());
  15.  
  16.             if (daytime == "day")
  17.                 if (n < 20)
  18.                     Console.WriteLine(0.70 + n * 0.79);
  19.                 if (n > 20)
  20.                     Console.WriteLine(n * 0.09);
  21.                 if (n > 100)
  22.                     Console.WriteLine(n * 0.06);
  23.  
  24.             if (daytime == "night")
  25.                 if (n < 20)
  26.                     Console.WriteLine(0.70 + n * 0.90);
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement