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 last
- {
- class Program
- {
- static void Main(string[] args)
- {
- string ten, loai_san_pham = "";
- int so_luong = 0;
- int HMA = 200000;
- int VIP72 = 600000;
- int sock = 400000;
- int tong_tien = 0;
- int tien_giam = 0;
- Console.WriteLine("Chao mung den voi cua hang MMO");
- Console.WriteLine("Shop chung toi chi ban 3 loai san pham : HMA , VIP72 , sock");
- Console.WriteLine("HMA co gia 200 000/1 tai khoan");
- Console.WriteLine("VIP72 co gia 600 000/1 tai khoan");
- Console.WriteLine("Con sock co gia 400 000/1 tai khoan");
- Console.WriteLine("Ten ban la gi ?");
- ten = (Console.ReadLine());
- Console.WriteLine("Ban muon mua loai tai khoan nao nhi ?(nhap dung dinh dang HMA, VIP72, sock)");
- loai_san_pham = (Console.ReadLine());
- Console.WriteLine("Ban muon mua bao nhieu tai khoan?");
- so_luong = Convert.ToInt32(Console.ReadLine());
- switch (loai_san_pham)
- {
- case "HMA":
- tong_tien = HMA * so_luong;
- break;
- case "VIP72":
- tong_tien = VIP72 * so_luong;
- break;
- case "sock":
- tong_tien = sock * so_luong;
- break;
- default:
- Console.WriteLine("Ban nhap sai roi , tat di bat lai nha ^^");
- break;
- }
- if (so_luong >= 1 && so_luong <= 10)
- {
- tien_giam = tong_tien * 1 / 10;
- }
- else if (so_luong > 10 && so_luong < 20)
- {
- Console.WriteLine("");
- tien_giam = tong_tien * 2 / 10;
- }
- else
- {
- tien_giam = tong_tien * 3 / 10;
- }
- int tien_phai_tra = tong_tien - tien_giam;
- Console.WriteLine("Hoa don");
- Console.WriteLine("Ten khach hang : " + ten);
- Console.WriteLine("so tien khi chua giam gia: " + tong_tien);
- Console.WriteLine("So tien giam gia : " + tien_giam);
- Console.WriteLine("So tien phai tra la: " + tien_phai_tra);
- if (tien_phai_tra >= 100000 && tien_phai_tra <= 200000)
- {
- Console.WriteLine("Ban duoc tang 5 point vao acc");
- Console.ReadLine();
- }
- else if (tien_phai_tra > 200000 && tien_phai_tra <= 400000)
- {
- Console.WriteLine("Ban duoc tang 10 point vao acc");
- Console.ReadLine();
- }
- else if (tien_phai_tra > 400000) ;
- {
- Console.WriteLine("Ban duoc tang 15 point vao acc");
- Console.ReadLine();
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement