Advertisement
Guest User

Untitled

a guest
Aug 28th, 2016
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 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 Problem1
  8. {
  9. class Problem1
  10. {
  11. static void Main(string[] args)
  12. {
  13. string text = Console.ReadLine();
  14. double n = double.Parse(Console.ReadLine());
  15.  
  16. double testStudio = 0;
  17. double testStudio2 = 0;
  18.  
  19. double testApartament = 0;
  20. double testApartament2 = 0;
  21.  
  22. if (text == "May" || text == "October")
  23. {
  24. if (n >= 7 && n < 14)
  25. {
  26.  
  27. testStudio = 50 * 0.95;
  28. Console.WriteLine("Studio: {0:F2} lv.", testStudio);
  29.  
  30. }
  31. else if (n >= 14)
  32. {
  33. testApartament = 65 * 0.9;
  34. testApartament2 = testApartament * n;
  35. Console.WriteLine("Apartment: {0:F2} lv.", testApartament2);
  36.  
  37. testStudio = 50 * 0.7;
  38. testStudio2 = testStudio * n;
  39. Console.WriteLine("Studio: {0:F2} lv.", testStudio2);
  40. }
  41. }
  42.  
  43.  
  44. else if (text == "June" || text == "September")
  45. {
  46.  
  47. //if (n >= 7 && n < 14)
  48. //{
  49.  
  50.  
  51. // testStudio = 75.20 * 0.95;
  52. // testStudio2 = testStudio * n;
  53. // Console.WriteLine("Studio: {0:F2} lv.", testStudio2);
  54.  
  55.  
  56. //}
  57. if (n >= 14)
  58. {
  59. testApartament = 68.70 * 0.9;
  60. testApartament2 = testApartament * n;
  61. Console.WriteLine("Apartment: {0:F2} lv.", testApartament2);
  62.  
  63. testStudio = 75.20 * 0.8;
  64. testStudio2 = testStudio * n;
  65. Console.WriteLine("Studio: {0:F2} lv.", testStudio2);
  66. }
  67.  
  68.  
  69. }
  70. else if (text == "Juli" || text == "August")
  71. {
  72. if (n >= 7 && n < 14)
  73. {
  74. testStudio = 76 * 0.95;
  75. Console.WriteLine("Studio: {0:F2} lv.", testStudio);
  76. }
  77. else if (n >= 14)
  78. {
  79. testApartament = 77 * 0.9;
  80. testApartament2 = testApartament * n;
  81. Console.WriteLine("Apartment: {0:F2} lv.", testApartament2);
  82.  
  83. testStudio = 76 * n;
  84. Console.WriteLine("Studio: {0:F2} lv.", testStudio);
  85. }
  86. }
  87.  
  88.  
  89. }
  90. }
  91. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement