Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string name, dichvu = "";
- int sochon , soluong , thanhtien = 0;
- Console.WriteLine("Chao mung cac ban den voi dich vu mmo");
- Console.WriteLine("Vui long cho biet ten cua ban:");
- name = Console.ReadLine();
- Console.WriteLine("Xin chao"+" "+name+" "+"vui long chon loai dich vu ban muon mua");
- Console.WriteLine("Account Hma = 100.000$");
- Console.WriteLine("Account Vip72 = 200.000$");
- Console.WriteLine("Account Sockescort = 300.000$");
- Console.WriteLine("1 = Hma , 2 = Vip 72 , 3 = Sockescort");
- sochon = Convert.ToInt32(Console.ReadLine());
- switch (sochon)
- {
- case 1:
- Console.WriteLine("Hay nhap so luong account Hma ban muon mua");
- soluong =Convert.ToInt32(Console.ReadLine());
- if (soluong ==0)
- {
- Console.WriteLine("Hay mua it nhat mot account");
- }
- else if( soluong >0 && soluong <=10)
- {
- thanhtien = (soluong * 100000) - (soluong * 100000 * 10/100);
- Console.WriteLine("Tong so tien la:" + " " + thanhtien + "$");
- }
- else if(soluong >=11 && soluong <=20)
- {
- thanhtien = (soluong * 100000) - (soluong * 100000 * 20 / 100);
- Console.WriteLine("Tong so tien la:" + " " + thanhtien + "$");
- }
- else
- {
- thanhtien = (soluong * 100000) - (soluong * 100000 * 30 / 100);
- Console.WriteLine("Tong so tien la:" + " " + thanhtien + "$");
- }
- break;
- case 2:
- Console.WriteLine("Hay nhap so luong account Vip 72 ban muon mua");
- soluong = Convert.ToInt32(Console.ReadLine());
- if (soluong ==0)
- {
- Console.WriteLine("Hay mua it nhat mot account");
- }
- else if( soluong >0 && soluong <=10)
- {
- thanhtien = (soluong * 200000) - (soluong * 200000 * 10 / 100);
- Console.WriteLine("Tong so tien la:" + " " + thanhtien + "$");
- }
- else if(soluong >=11 && soluong <=20)
- {
- thanhtien = (soluong * 200000) - (soluong * 200000 * 20 / 100);
- Console.WriteLine("Tong so tien la:" + " " + thanhtien + "$");
- }
- else
- {
- thanhtien = (soluong * 200000) - (soluong * 200000 * 30 / 100);
- Console.WriteLine("Tong so tien la:" + " " + thanhtien + "$");
- }
- break;
- case 3:
- Console.WriteLine("Hay nhap so luong account Sockescort ban muon mua");
- soluong = Convert.ToInt32(Console.ReadLine());
- if (soluong ==0)
- {
- Console.WriteLine("Hay mua it nhat mot account");
- }
- else if( soluong >0 && soluong <=10)
- {
- thanhtien = (soluong * 300000) - (soluong * 300000 * 10 / 100);
- Console.WriteLine("Tong so tien la:"+" "+thanhtien+"$");
- }
- else if(soluong >=11 && soluong <=20)
- {
- thanhtien = (soluong * 300000) - (soluong * 300000 * 20 / 100);
- Console.WriteLine("Tong so tien la:" + " " + thanhtien + "$");
- }
- else
- {
- thanhtien = (soluong * 300000) - (soluong * 300000 * 30 / 100);
- Console.WriteLine("Tong so tien la:" + " " + thanhtien + "$");
- }
- break;
- }
- if (thanhtien >= 100000 && thanhtien <=200000)
- {
- Console.WriteLine(name+" "+"se duoc cong them 5 point vao tai khoan");
- }
- else if (thanhtien >200000 && thanhtien <=400000)
- {
- Console.WriteLine(name+" "+"se duoc cong them 10 point vao tai khoan");
- }
- else if (thanhtien > 200000 && thanhtien <= 400000)
- {
- Console.WriteLine(name+" "+"se duoc cong them 15 point vao tai khoan");
- }
- else
- {
- Console.WriteLine(name+" "+"se duoc cong them 20 point vao tai khoan");
- }
- Console.ReadLine();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement