Advertisement
tuan6956

bai tap 69

Aug 8th, 2015
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace baitap1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.WriteLine("xin chao cac ban den voi dich vu mmo");
  14.             Console.WriteLine("ban account cac phan men hma, vip72, sockescort!");
  15.             //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
  16.             float account_hma = 150000;
  17.             float account_vip72 = 100000;
  18.             float account_sockescort = 200000;
  19.             double tong_gia_tien = 0;
  20.             double tong_gia_tien_sau_khi_giam_gia = 0;
  21.             int tong_so_account_da_mua = 0;
  22.             double so_tien_giam_gia = 0;
  23.             int so_luong_account_hma = 0;
  24.             int so_luong_account_vip72 = 0;
  25.             int so_luong_account_escort = 0;
  26.             string Ten_Khach_Hang = "";
  27.             Console.WriteLine("xin moi nhap ten khach hang: ");
  28.             Ten_Khach_Hang =Console.ReadLine();
  29.             Console.WriteLine("moi nhap so luong account hma can mua : " + " (Neu khong mua thi nhap 0)" );
  30.             so_luong_account_hma = Convert.ToInt32(Console.ReadLine());
  31.             Console.WriteLine("moi nhap so luong account vip72 can mua : "+" (Neu khong mua thi nhap 0)" );
  32.             so_luong_account_vip72 = Convert.ToInt32(Console.ReadLine());
  33.             Console.WriteLine("moi nhap so luong account escort can mua : " +" (Neu khong mua thi nhap 0)");
  34.             so_luong_account_escort = Convert.ToInt32(Console.ReadLine());
  35.             tong_gia_tien = so_luong_account_hma*account_hma+so_luong_account_vip72*account_vip72+so_luong_account_escort*account_sockescort;
  36.             tong_so_account_da_mua = so_luong_account_escort+so_luong_account_hma+so_luong_account_vip72;
  37.             Console.WriteLine("tong gia tien ban phai tra:  "+tong_gia_tien+" (VND)");
  38.             Console.WriteLine("tong so account da mua:  " + tong_so_account_da_mua);            
  39.             if (tong_so_account_da_mua >= 1 && tong_so_account_da_mua <= 10)
  40.             {
  41.                 Console.WriteLine("ban da mua " + tong_so_account_da_mua + " account  nen ban duoc giam 10%");
  42.                 so_tien_giam_gia = tong_gia_tien * 0.1;
  43.                 tong_gia_tien_sau_khi_giam_gia = tong_gia_tien * 0.9;
  44.                 Console.WriteLine("HOA DON MUA HANG : ");
  45.                 Console.WriteLine("     Ten khach hang : " + Ten_Khach_Hang);
  46.                 Console.WriteLine("     tong tien : " + tong_gia_tien + " (VND)");
  47.                 Console.WriteLine("     Tien giam : " + so_tien_giam_gia + " (VND)");
  48.                 Console.WriteLine("     Tong tien phai tra sau khi giam : " + tong_gia_tien_sau_khi_giam_gia + " (VND)");
  49.             }
  50.             else if (tong_so_account_da_mua > 11 && tong_so_account_da_mua <= 20)
  51.             {
  52.                 Console.WriteLine("ban da mua " + tong_so_account_da_mua + " account  nen ban duoc giam 20%");
  53.                 so_tien_giam_gia = tong_gia_tien * 0.2;
  54.                 tong_gia_tien_sau_khi_giam_gia = tong_gia_tien * 0.8;
  55.                 Console.WriteLine("HOA DON MUA HANG : ");
  56.                 Console.WriteLine("     Ten khach hang : " + Ten_Khach_Hang);
  57.                 Console.WriteLine("     tong tien : " + tong_gia_tien + " (VND)");
  58.                 Console.WriteLine("     Tien giam : " + so_tien_giam_gia + " (VND)");
  59.                 Console.WriteLine("     Tong tien phai tra sau khi giam : " + tong_gia_tien_sau_khi_giam_gia + " (VND)");
  60.                 Console.ReadLine();
  61.             }
  62.             else
  63.             {
  64.                 Console.WriteLine("ban da mua " + tong_so_account_da_mua + " account  nen ban duoc giam 30%");
  65.                 so_tien_giam_gia = tong_gia_tien *0.3;
  66.                 tong_gia_tien_sau_khi_giam_gia = tong_gia_tien * 0.7;
  67.                 Console.WriteLine("HOA DON MUA HANG : ");
  68.                 Console.WriteLine("     Ten khach hang : " + Ten_Khach_Hang);
  69.                 Console.WriteLine("     tong tien : " + tong_gia_tien + " (VND)");
  70.                 Console.WriteLine("     Tien giam : " + so_tien_giam_gia + " (VND)");
  71.                 Console.WriteLine("     Tong tien phai tra sau khi giam : " + tong_gia_tien_sau_khi_giam_gia + " (VND)");
  72.                 Console.ReadLine();
  73.             }
  74.             if (tong_gia_tien_sau_khi_giam_gia >=100000 && tong_gia_tien_sau_khi_giam_gia<=200000)
  75.             {
  76.                 Console.WriteLine("khach hang duoc cong 5 point vao tai khoan thuong");
  77.  
  78.             }
  79.             else if (tong_gia_tien_sau_khi_giam_gia >=201000 && tong_gia_tien_sau_khi_giam_gia <=400000)
  80.             {
  81.                 Console.WriteLine("khach hang duoc cong 10 point vao tai khoan thuong");
  82.             }
  83.             else
  84.             {
  85.                 Console.WriteLine("khach hang duoc cong 15 point vao tai khoan thuong");
  86.             }
  87.  
  88.            
  89.             Console.ReadLine();
  90.         }
  91.     }
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement