Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Dichvummo
- {
- class Program
- {
- static void Main(string[] args)
- {
- string name ="";
- int dichvu , thanhtien , soluong =0;
- Console.WriteLine("Chao mung ban den voi dich vu mmo");
- Console.WriteLine("Ten cua ban la");
- name = Console.ReadLine();
- Console.WriteLine("Chao"+" "+name+" "+"hay lua dich vu ban muon");
- Console.WriteLine("Nhan 1 neu ban muon mua acc HMA");
- Console.WriteLine("Nhan 2 neu ban muon mua acc Vip 72");
- Console.WriteLine("Nhan 3 neu ban muon mua acc Sockescort");
- dichvu = Convert.ToInt32(Console.ReadLine());
- switch (dichvu)
- {
- case 1:
- Console.WriteLine("1 acc HMA gia 100.000d");
- Console.WriteLine("Vui long cho biet so luong can mua");
- soluong=Convert.ToInt32(Console.ReadLine());
- if (soluong == 0)
- {
- Console.WriteLine("Vui long chon it nhat 1 account");
- }
- else if (soluong > 0 && soluong <= 10)
- {
- thanhtien =(soluong*100000)-(soluong * 100000) * 10/100;
- Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
- }
- else if (soluong > 10 && soluong <= 20)
- {
- thanhtien =(soluong * 100000) - (soluong * 100000) * 20/100;
- Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
- }
- else
- {
- thanhtien = (soluong * 100000) - (soluong * 100000) * 30/100;
- Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
- }
- break;
- case 2:
- Console.WriteLine("1 acc Vip 72 gia 200.000d");
- Console.WriteLine("Vui long cho biet so luong can mua");
- soluong = Convert.ToInt32(Console.ReadLine());
- if (soluong == 0)
- {
- Console.WriteLine("Vui long chon it nhat 1 account");
- }
- else if (soluong > 0 && soluong <= 10)
- {
- thanhtien = (soluong * 200000) - (soluong * 200000) *10/100;
- Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
- }
- else if (soluong > 10 && soluong <= 20)
- {
- thanhtien = (soluong * 200000) - (soluong * 200000) * 20/100;
- Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
- }
- else
- {
- thanhtien = (soluong * 200000) - (soluong * 200000) * 30/100;
- Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
- }
- break;
- case 3:
- Console.WriteLine("1 acc Sockescort gia 300.000d");
- Console.WriteLine("Vui long cho biet so luong can mua");
- soluong = Convert.ToInt32(Console.ReadLine());
- if (soluong == 0)
- {
- Console.WriteLine("Vui long chon it nhat 1 account");
- }
- else if (soluong > 0 && soluong <= 10)
- {
- thanhtien = (soluong * 300000) - (soluong * 300000) * 10/100;
- Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
- }
- else if (soluong > 10 && soluong <= 20)
- {
- thanhtien = (soluong * 300000) - (soluong * 300000) * 20/100;
- Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
- }
- else
- {
- thanhtien = (soluong * 300000) - (soluong * 300000) * 30/100;
- Console.WriteLine("Tong so tien phai tra la" + " " + thanhtien);
- }
- break;
- }
- Console.WriteLine("Hoa don cua ban");
- Console.WriteLine("Ten nguoi mua" + " " + name);
- Console.WriteLine("Mua" + " " + soluong);
- Console.WriteLine("Tong gia tri" + " "+ ̶t̶̶h̶̶a̶̶n̶̶h̶̶t̶̶i̶̶e̶̶n̶);
- if (thanhtien >= 100000 && thanhtien <= 200000)
- {
- Console.WriteLine("Ban duoc cong them 5 point vao tai khoan");
- }
- else if (thanhtien > 200000 && thanhtien <= 400000)
- {
- Console.WriteLine("Ban duoc cong them 10 point vao tai khoan");
- }
- else
- {
- Console.WriteLine("Ban duoc cong them 5 point vao tai khoan");
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement