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 baitap1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("xin chao cac ban den voi dich vu mmo");
- Console.WriteLine("ban account cac phan men hma, vip72, sockescort!");
- //tất cả giá account đều có thời hạn 1 tháng, khi hết các bạn inbox yaho để gia hạn thêm
- float account_hma = 150000;
- float account_vip72 = 100000;
- float account_sockescort = 200000;
- double tong_gia_tien = 0;
- double tong_gia_tien_sau_khi_giam_gia = 0;
- int tong_so_account_da_mua = 0;
- double so_tien_giam_gia = 0;
- int so_luong_account_hma = 0;
- int so_luong_account_vip72 = 0;
- int so_luong_account_escort = 0;
- string Ten_Khach_Hang = "";
- Console.WriteLine("xin moi nhap ten khach hang: ");
- Ten_Khach_Hang =Console.ReadLine();
- Console.WriteLine("moi nhap so luong account hma can mua : " + " (Neu khong mua thi nhap 0)" );
- so_luong_account_hma = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("moi nhap so luong account vip72 can mua : "+" (Neu khong mua thi nhap 0)" );
- so_luong_account_vip72 = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("moi nhap so luong account escort can mua : " +" (Neu khong mua thi nhap 0)");
- so_luong_account_escort = Convert.ToInt32(Console.ReadLine());
- tong_gia_tien = so_luong_account_hma*account_hma+so_luong_account_vip72*account_vip72+so_luong_account_escort*account_sockescort;
- tong_so_account_da_mua = so_luong_account_escort+so_luong_account_hma+so_luong_account_vip72;
- Console.WriteLine("tong gia tien ban phai tra: "+tong_gia_tien+" (VND)");
- Console.WriteLine("tong so account da mua: " + tong_so_account_da_mua);
- if (tong_so_account_da_mua >= 1 && tong_so_account_da_mua <= 10)
- {
- Console.WriteLine("ban da mua " + tong_so_account_da_mua + " account nen ban duoc giam 10%");
- so_tien_giam_gia = tong_gia_tien * 0.1;
- tong_gia_tien_sau_khi_giam_gia = tong_gia_tien * 0.9;
- Console.WriteLine("HOA DON MUA HANG : ");
- Console.WriteLine(" Ten khach hang : " + Ten_Khach_Hang);
- Console.WriteLine(" tong tien : " + tong_gia_tien + " (VND)");
- Console.WriteLine(" Tien giam : " + so_tien_giam_gia + " (VND)");
- Console.WriteLine(" Tong tien phai tra sau khi giam : " + tong_gia_tien_sau_khi_giam_gia + " (VND)");
- }
- else if (tong_so_account_da_mua > 11 && tong_so_account_da_mua <= 20)
- {
- Console.WriteLine("ban da mua " + tong_so_account_da_mua + " account nen ban duoc giam 20%");
- so_tien_giam_gia = tong_gia_tien * 0.2;
- tong_gia_tien_sau_khi_giam_gia = tong_gia_tien * 0.8;
- Console.WriteLine("HOA DON MUA HANG : ");
- Console.WriteLine(" Ten khach hang : " + Ten_Khach_Hang);
- Console.WriteLine(" tong tien : " + tong_gia_tien + " (VND)");
- Console.WriteLine(" Tien giam : " + so_tien_giam_gia + " (VND)");
- Console.WriteLine(" Tong tien phai tra sau khi giam : " + tong_gia_tien_sau_khi_giam_gia + " (VND)");
- Console.ReadLine();
- }
- else
- {
- Console.WriteLine("ban da mua " + tong_so_account_da_mua + " account nen ban duoc giam 30%");
- so_tien_giam_gia = tong_gia_tien *0.3;
- tong_gia_tien_sau_khi_giam_gia = tong_gia_tien * 0.7;
- Console.WriteLine("HOA DON MUA HANG : ");
- Console.WriteLine(" Ten khach hang : " + Ten_Khach_Hang);
- Console.WriteLine(" tong tien : " + tong_gia_tien + " (VND)");
- Console.WriteLine(" Tien giam : " + so_tien_giam_gia + " (VND)");
- Console.WriteLine(" Tong tien phai tra sau khi giam : " + tong_gia_tien_sau_khi_giam_gia + " (VND)");
- Console.ReadLine();
- }
- if (tong_gia_tien_sau_khi_giam_gia >=100000 && tong_gia_tien_sau_khi_giam_gia<=200000)
- {
- Console.WriteLine("khach hang duoc cong 5 point vao tai khoan thuong");
- }
- else if (tong_gia_tien_sau_khi_giam_gia >=201000 && tong_gia_tien_sau_khi_giam_gia <=400000)
- {
- Console.WriteLine("khach hang duoc cong 10 point vao tai khoan thuong");
- }
- else
- {
- Console.WriteLine("khach hang duoc cong 15 point vao tai khoan thuong");
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement