Advertisement
hongan

dichvummo

Aug 11th, 2015
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.29 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 Dichvummo
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string name ="";
  14. int dichvu , thanhtien , soluong =0;
  15. Console.WriteLine("Chao mung ban den voi dich vu mmo");
  16. Console.WriteLine("Ten cua ban la");
  17. name = Console.ReadLine();
  18. Console.WriteLine("Chao"+" "+name+" "+"hay lua dich vu ban muon");
  19. Console.WriteLine("Nhan 1 neu ban muon mua acc HMA");
  20. Console.WriteLine("Nhan 2 neu ban muon mua acc Vip 72");
  21. Console.WriteLine("Nhan 3 neu ban muon mua acc Sockescort");
  22. dichvu = Convert.ToInt32(Console.ReadLine());
  23. switch (dichvu)
  24. {
  25. case 1:
  26. Console.WriteLine("1 acc HMA gia 100.000d");
  27. Console.WriteLine("Vui long cho biet so luong can mua");
  28. soluong=Convert.ToInt32(Console.ReadLine());
  29. if (soluong == 0)
  30. {
  31. Console.WriteLine("Vui long chon it nhat 1 account");
  32. }
  33. else if (soluong > 0 && soluong <= 10)
  34. {
  35. thanhtien =(soluong*100000)-(soluong * 100000) * 10/100;
  36. Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
  37. }
  38. else if (soluong > 10 && soluong <= 20)
  39. {
  40. thanhtien =(soluong * 100000) - (soluong * 100000) * 20/100;
  41. Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
  42. }
  43. else
  44. {
  45. thanhtien = (soluong * 100000) - (soluong * 100000) * 30/100;
  46. Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
  47. }
  48. break;
  49. case 2:
  50. Console.WriteLine("1 acc Vip 72 gia 200.000d");
  51. Console.WriteLine("Vui long cho biet so luong can mua");
  52. soluong = Convert.ToInt32(Console.ReadLine());
  53. if (soluong == 0)
  54. {
  55. Console.WriteLine("Vui long chon it nhat 1 account");
  56. }
  57. else if (soluong > 0 && soluong <= 10)
  58. {
  59. thanhtien = (soluong * 200000) - (soluong * 200000) *10/100;
  60. Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
  61. }
  62. else if (soluong > 10 && soluong <= 20)
  63. {
  64. thanhtien = (soluong * 200000) - (soluong * 200000) * 20/100;
  65. Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
  66. }
  67. else
  68. {
  69. thanhtien = (soluong * 200000) - (soluong * 200000) * 30/100;
  70. Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
  71. }
  72. break;
  73. case 3:
  74. Console.WriteLine("1 acc Sockescort gia 300.000d");
  75. Console.WriteLine("Vui long cho biet so luong can mua");
  76. soluong = Convert.ToInt32(Console.ReadLine());
  77. if (soluong == 0)
  78. {
  79. Console.WriteLine("Vui long chon it nhat 1 account");
  80. }
  81. else if (soluong > 0 && soluong <= 10)
  82. {
  83. thanhtien = (soluong * 300000) - (soluong * 300000) * 10/100;
  84. Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
  85. }
  86. else if (soluong > 10 && soluong <= 20)
  87. {
  88. thanhtien = (soluong * 300000) - (soluong * 300000) * 20/100;
  89. Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
  90. }
  91. else
  92. {
  93. thanhtien = (soluong * 300000) - (soluong * 300000) * 30/100;
  94. Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
  95. }
  96. break;
  97. }
  98. Console.WriteLine("Hoa don cua ban");
  99. Console.WriteLine("Ten nguoi mua" + " " + name);
  100. Console.WriteLine("Mua" + " " + soluong);
  101. Console.WriteLine("Tong gia tri" + " "+ ̶t̶̶h̶̶a̶̶n̶̶h̶̶t̶̶i̶̶e̶̶n̶);
  102. if (thanhtien >= 100000 && thanhtien <= 200000)
  103. {
  104. Console.WriteLine("Ban duoc cong them 5 point vao tai khoan");
  105. }
  106. else if (thanhtien > 200000 && thanhtien <= 400000)
  107. {
  108. Console.WriteLine("Ban duoc cong them 10 point vao tai khoan");
  109. }
  110. else
  111. {
  112. Console.WriteLine("Ban duoc cong them 5 point vao tai khoan");
  113. }
  114. Console.ReadLine();
  115. }
  116. }
  117. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement