Guest User

Untitled

a guest
Jun 27th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 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 Transport
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var n = double.Parse(Console.ReadLine());
  14. var part = Console.ReadLine();
  15.  
  16.  
  17. if (n < 20 && part == "day")
  18. {
  19. Console.WriteLine((n * 0.79) + 0.70);
  20. }
  21. else if (n < 20 && part == "night")
  22. {
  23. Console.WriteLine((n * 0.90) + 0.70);
  24. }
  25. else if (n >= 20 && n < 100)
  26. {
  27. Console.WriteLine(n * 0.09);
  28. }
  29. else if (n >= 100)
  30. {
  31. Console.WriteLine(n * 0.06);
  32. }
  33. else
  34. {
  35. Console.WriteLine("Incorrect input");
  36. }
  37. }
  38. }
  39. }
Add Comment
Please, Sign In to add comment