public static void Main(string[] args) { PHAN_SO A; PHAN_SO B; QUAN_HE kq; A = XL_PHAN_SO.Nhap("Nhap phan so A:\n"); B = XL_PHAN_SO.Nhap("Nhap phan so B:\n"); kq = XL_PHAN_SO.So_sanh(A, B); String Chuoi; Chuoi = XL_PHAN_SO.Chuoi(A) + "kq" + XL_PHAN_SO.Chuoi(B); if (kq == QUAN_HE.Nho_hon) { Chuoi = Chuoi.Replace("kq", "<"); } else if (kq == QUAN_HE.Bang_nhau) { Chuoi = Chuoi.Replace("kq", "="); } else if (kq == QUAN_HE.Lon_hon) { Chuoi = Chuoi.Replace("kq", ">"); } XL_CHUOI.Xuat(Chuoi); }
static void Main(string[] args) { PHUONG_TRINH_DUONG_THANG D1, D2; VI_TRI_TUONG_DOI kq; D1 = XL_DUONG_THANG.Nhap("Nhap phuong trinh duong thang D1 dang ax+by+c=0\n"); D2 = XL_DUONG_THANG.Nhap("Nhap phuong trinh duong thang D2 dang ax+by+c=0\n"); kq = XL_DUONG_THANG.Vi_tri_tuong_doi(D1, D2); String Chuoi; Chuoi = "Duong thang D1:" + XL_DUONG_THANG.Chuoi(D1); Chuoi = Chuoi + " _ duong thang D2:" + XL_DUONG_THANG.Chuoi(D2); if (kq == VI_TRI_TUONG_DOI.Cat_nhau) { Chuoi = Chuoi.Replace("_", "cat"); } else if (kq == VI_TRI_TUONG_DOI.Song_song) { Chuoi = Chuoi.Replace("_", "song song voi"); } else { Chuoi = Chuoi.Replace("_", "trung voi"); } XL_CHUOI.Xuat(Chuoi); }
public static Double[,] Nhap(String Ghi_chu) { Double[,] kq; String Chuoi; do { XL_CHUOI.Xuat(Ghi_chu); Chuoi = Console.ReadLine(); } while (!Kiem_tra(Chuoi)); String[] Chuoi_dong = Chuoi.Split(new char[] { Ky_tu_phan_cach_dong }); int So_dong = Chuoi_dong.Length; int So_cot = Chuoi_dong[0].Split(new char[] { Ky_tu_phan_cach_cot }).Length; kq = new Double[So_dong, So_cot]; for (int i = 0; i < So_dong; i++) { String[] Dong = Chuoi_dong[i].Split(new char[] { ',' }); for (int j = 0; j < So_cot; j++) { kq[i, j] = Double.Parse(Dong[j]); } } return(kq); }
protected void Page_Load(object sender, EventArgs e) { Application.Lock(); QUANLY ql = (QUANLY)Application["QUANLY"]; ArrayList lst = (ArrayList)Application["DanhSachNoiDung"]; int SoNguoi = ql.SoNguoiChoi + ql.SoNguoiXem; int CauLuuTruHienTai = (int)Application["CauLuuTruHienTai"]; int SoCauDaChat = (int)Application["SoCauDaChat"]; int SoCauDaLay = (int)Session["SoCauDaLay"]; XL_THE The = new XL_THE("Goc"); for (int i = Math.Max(SoCauDaLay, CauLuuTruHienTai); i < SoCauDaChat; ++i) { NoiDungChat ndc = (NoiDungChat)lst[i - CauLuuTruHienTai]; String NoiDung = ndc.NoiDung; String NguoiGui = ndc.TenNguoiGui; XL_THE TheCon = new XL_THE("Cau"); XL_THUOC_TINH ThuocTinh = new XL_THUOC_TINH("NoiDung", NoiDung); TheCon.Danh_sach_thuoc_tinh.Add(ThuocTinh); ThuocTinh = new XL_THUOC_TINH("NguoiGui", NguoiGui); TheCon.Danh_sach_thuoc_tinh.Add(ThuocTinh); The.Danh_sach_the.Add(TheCon); ndc.SoLanLay++; } Session["SoCauDaLay"] = SoCauDaChat; DonDep(); String Chuoi = The.Chuoi(); XL_CHUOI.Xuat(Response, Chuoi); Application.UnLock(); }
public static NHI_THUC Nhap(String Ghi_chu) { NHI_THUC kq; XL_CHUOI.Xuat(Ghi_chu); kq.a = XL_SO_THUC.Nhap("Nhap a : "); kq.b = XL_SO_THUC.Nhap("Nhap b : "); return(kq); }
public static PHUONG_TRINH_DUONG_THANG Nhap(String Ghi_chu) { PHUONG_TRINH_DUONG_THANG kq; XL_CHUOI.Xuat(Ghi_chu); kq.a = XL_SO_THUC.Nhap("Nhap a:"); kq.b = XL_SO_THUC.Nhap("Nhap b:"); kq.c = XL_SO_THUC.Nhap("Nhap c:"); return kq; }
public static DUONG_TRON Nhap(String Ghi_chu) { DUONG_TRON kq; XL_CHUOI.Xuat(Ghi_chu); kq.I = XL_DIEM.Nhap("Toa do tam I cua duong tron:\n"); kq.R = XL_SO_THUC.Nhap("Nhap R:"); return(kq); }
public static PHAN_SO Nhap(String Ghi_chu) { PHAN_SO kq; XL_CHUOI.Xuat(Ghi_chu); kq.Tu_so = XL_SO_NGUYEN.Nhap("Tu so:"); kq.Mau_so = XL_SO_NGUYEN.Nhap("Mau so:"); return(kq); }
public static DON_THUC Nhap(String Ghi_chu) { DON_THUC kq; XL_CHUOI.Xuat(Ghi_chu); kq.He_so = XL_SO_THUC.Nhap("He so = "); kq.So_mu = XL_SO_NGUYEN.Nhap("So mu = "); return(kq); }
public static DIEM Nhap(String Ghi_chu) { DIEM kq; XL_CHUOI.Xuat(Ghi_chu); kq.x = XL_SO_THUC.Nhap("Hoanh do:"); kq.y = XL_SO_THUC.Nhap("Tung do:"); return(kq); }
public static TAM_THUC Nhap(String Ghi_chu) { TAM_THUC kq; XL_CHUOI.Xuat(Ghi_chu); kq.a = XL_SO_THUC.Nhap("a="); kq.b = XL_SO_THUC.Nhap("b="); kq.c = XL_SO_THUC.Nhap("c="); return(kq); }
public static void Main() { String Ho_ten; String Loi_chao; Ho_ten = XL_CHUOI.Nhap("Ho va ten:"); Loi_chao = "Xin chao" + Ho_ten + "\n"; Loi_chao = Loi_chao + "Cam on vi da su dung chuong trinh nay"; XL_CHUOI.Xuat(Loi_chao); }
protected void Page_Load(object sender, EventArgs e) { QUANLY ql = (QUANLY)Application["QUANLY"]; int luotdi = ql.LuotDi; int XiNgau = ql.XiNgau; Boolean DangDoXiNgau = ql.DangDoXiNgau; int[] vitri = ql.BanCo.ViTriCacQuanCo; XL_THE The = new XL_THE("Goc"); XL_THE TheCon = new XL_THE("LuotDi"); XL_THUOC_TINH ThuocTinh = new XL_THUOC_TINH("GiaTri", luotdi.ToString()); // Them luot di vao xml TheCon.Danh_sach_thuoc_tinh.Add(ThuocTinh); The.Danh_sach_the.Add(TheCon); TheCon = new XL_THE("XiNgau"); ThuocTinh = new XL_THUOC_TINH("GiaTri", XiNgau.ToString()); // Them Xi Ngau vao xml TheCon.Danh_sach_thuoc_tinh.Add(ThuocTinh); The.Danh_sach_the.Add(TheCon); TheCon = new XL_THE("DangDoXiNgau"); ThuocTinh = new XL_THUOC_TINH("GiaTri", (DangDoXiNgau ? 1 : 0).ToString()); // Them DangDoXiNgau vao xml TheCon.Danh_sach_thuoc_tinh.Add(ThuocTinh); The.Danh_sach_the.Add(TheCon); int SoNguoiChoi = ql.SoNguoiChoi; int SoNguoiXem = ql.SoNguoiXem; TheCon = new XL_THE("SoNguoiChoi"); ThuocTinh = new XL_THUOC_TINH("GiaTri", SoNguoiChoi.ToString()); // Them SoNguoiChoi vao xml TheCon.Danh_sach_thuoc_tinh.Add(ThuocTinh); The.Danh_sach_the.Add(TheCon); TheCon = new XL_THE("SoNguoiXem"); ThuocTinh = new XL_THUOC_TINH("GiaTri", SoNguoiXem.ToString()); // Them SoNguoiXem vao xml TheCon.Danh_sach_thuoc_tinh.Add(ThuocTinh); The.Danh_sach_the.Add(TheCon); // Vi tri cac quan co for (int i = 0; i < 16; ++i) { TheCon = new XL_THE("Co"); ThuocTinh = new XL_THUOC_TINH("ViTri", vitri[i].ToString()); TheCon.Danh_sach_thuoc_tinh.Add(ThuocTinh); The.Danh_sach_the.Add(TheCon); } String Chuoi = The.Chuoi(); XL_CHUOI.Xuat(Response, Chuoi); }
public static void Main(string[] args) { TAM_THUC P; ArrayList Nghiem; P = XL_TAM_THUC.Nhap("Nhap tam thuc bac 2:\n"); Nghiem = XL_TAM_THUC.Nghiem(P); String Chuoi = "Ket qua phuong trinh "; Chuoi = Chuoi + XL_TAM_THUC.Chuoi(P) + "=0" + "\n"; Chuoi = Chuoi + XL_NGHIEM.Chuoi(Nghiem); XL_CHUOI.Xuat(Chuoi); }
public static void Main(string[] args) { Double[] a; Double kq; a = XL_DAY_SO.Nhap("Nhap day so:"); kq = XL_DAY_SO.Tinh_tong(a); String Chuoi; Chuoi = "Day so : " + XL_DAY_SO.Chuoi(a) + "\n"; Chuoi = Chuoi + "co tong la " + kq; XL_CHUOI.Xuat(Chuoi); }
public static void Main(string[] args) { long[] a; long kq; a = XL_DAY_SO.Nhap("Day cac so nguyen:\n"); kq = XL_DAY_SO.Max(a); String Chuoi; Chuoi = "So lon nhat cua day so nguyen: " + XL_DAY_SO.Chuoi(a) + "\n"; Chuoi = Chuoi + "la " + kq; XL_CHUOI.Xuat(Chuoi); }
public static void Main(string[] args) { TAM_THUC P; CUC_TRI M; P = XL_TAM_THUC.Nhap("Nhap tam thuc bac 2:\n"); M = XL_TAM_THUC.Cuc_tri(P); String Chuoi; Chuoi = "Ham bac 2 f(x)=" + XL_TAM_THUC.Chuoi(P) + "\n"; Chuoi = Chuoi + "co cuc tri M" + XL_CUC_TRI.Chuoi(M); XL_CHUOI.Xuat(Chuoi); }
public static void Main(string[] args) { DON_THUC P; DON_THUC Q; P = XL_DON_THUC.Nhap("Nhap don thuc P(x):\n"); Q = XL_DON_THUC.Dao_ham(P); String Chuoi = "Dao ham cua P(x)="; Chuoi = Chuoi + XL_DON_THUC.Chuoi(P) + "\n"; Chuoi = Chuoi + " la Q(x)=" + XL_DON_THUC.Chuoi(Q); XL_CHUOI.Xuat(Chuoi); }
public static void Main(string[] args) { Double[] a; Double[] b; a = XL_DAY_SO.Nhap("Nhap day so nguyen:\n"); b = XL_DAY_SO.Sap_Tang(a); String Chuoi; Chuoi = "Day so nguyen truoc khi sap: \n" + XL_DAY_SO.Chuoi(a); Chuoi = Chuoi + "\n" + "Day so nguyen sau khi sap: \n"; Chuoi = Chuoi + XL_DAY_SO.Chuoi(b); XL_CHUOI.Xuat(Chuoi); }
public static void Main(string[] args) { TAM_GIAC tg; Double kq; tg = XL_TAM_GIAC.Nhap("Nhap toa do cac dinh cua tam giac:\n"); kq = XL_TAM_GIAC.Chu_vi(tg); String Chuoi; Chuoi = "Tam giac " + XL_TAM_GIAC.Chuoi(tg) + "\n"; Chuoi = Chuoi + "co chu vi la " + Math.Round(kq, 2); XL_CHUOI.Xuat(Chuoi); }
static void Main(string[] args) { NHI_THUC P; NGHIEM ng; P = XL_NHI_THUC.Nhap("Nhap vao nhi thuc dang ax+b:\n"); ng = XL_NHI_THUC.Tim_Nghiem(P); String Chuoi = "Bat phuong trinh "; Chuoi = Chuoi + XL_NHI_THUC.Chuoi(P) + ">0\n"; Chuoi = Chuoi + XL_NGHIEM.Chuoi(ng); XL_CHUOI.Xuat(Chuoi); }
public static void Main(string[] args) { BIEU_THUC P; long kq; P = XL_BIEU_THUC.Nhap("Nhap vao 1 bieu thuc:\n"); kq = XL_BIEU_THUC.Tinh(P); String Chuoi = ""; Chuoi = Chuoi + XL_BIEU_THUC.Chuoi(P) + " = "; Chuoi = Chuoi + kq; XL_CHUOI.Xuat(Chuoi); }
public static void Main(string[] args) { Double[,] a; Double kq; a = XL_MA_TRAN.Nhap("Nhap ma tran:\n"); kq = XL_MA_TRAN.Tinh_tong(a); String Chuoi; Chuoi = "Ma tran cac so " + "\n"; Chuoi = Chuoi + XL_MA_TRAN.Chuoi(a) + "\n"; Chuoi = Chuoi + "co tong la " + kq; XL_CHUOI.Xuat(Chuoi); }
public static void Main(string[] args) { BIEU_THUC P; PHAN_SO kq; P = XL_BIEU_THUC.Nhap("Nhap vao 1 bieu thuc phan so:\n"); kq = XL_BIEU_THUC.Tinh(P); String Chuoi = ""; Chuoi = Chuoi + XL_BIEU_THUC.Chuoi(P) + " = "; Chuoi = Chuoi + XL_PHAN_SO.Chuoi(kq); XL_CHUOI.Xuat(Chuoi); }
public static void Main(string[] args) { ArrayList Ps; PHAN_SO kq; Ps = XL_DAY_PHAN_SO.Nhap("Nhap vao day phan so:\n"); kq = XL_DAY_PHAN_SO.Max(Ps); String Chuoi = "Day cac phan so "; Chuoi = Chuoi + XL_DAY_PHAN_SO.Chuoi(Ps) + "\n"; Chuoi = Chuoi + "co phan so lon nhat la "; Chuoi = Chuoi + XL_PHAN_SO.Chuoi(kq); XL_CHUOI.Xuat(Chuoi); }
public static void Main() { TAM_GIAC tg; DIEM G; tg = XL_TAM_GIAC.Nhap("Nhap toa do 3 diem trong tam giac:\n"); G = XL_TAM_GIAC.Trong_tam(tg); String Chuoi; Chuoi = "Tam giac ABC voi "; Chuoi = Chuoi + XL_TAM_GIAC.Chuoi(tg); Chuoi = Chuoi + " co trong tam G" + XL_DIEM.Chuoi(G); XL_CHUOI.Xuat(Chuoi); }
public static TAM_GIAC Nhap(String Ghi_chu) { TAM_GIAC kq; XL_CHUOI.Xuat(Ghi_chu); do { kq.A = XL_DIEM.Nhap("Toa do A:\n"); kq.B = XL_DIEM.Nhap("Toa do B:\n"); kq.C = XL_DIEM.Nhap("Toa do C:\n"); } while (XL_DIEM.Thang_hang(kq.A, kq.B, kq.C)); return(kq); }
static void Main(string[] args) { PHAN_SO A, B, kq; A = XL_PHAN_SO.Nhap("Nhap phan so thu nhat:\n"); B = XL_PHAN_SO.Nhap("Nhap phan so thu hai:\n"); kq = XL_PHAN_SO.Tich(A, B); String Chuoi; Chuoi = XL_PHAN_SO.Chuoi(A) + " * "; Chuoi = Chuoi + XL_PHAN_SO.Chuoi(B) + " = "; Chuoi = Chuoi + XL_PHAN_SO.Chuoi(kq); XL_CHUOI.Xuat(Chuoi); }
public static void Main(string[] args) { Double[,] a; Double kq; a = XL_MA_TRAN.Nhap("Nhap ma tran :\n"); kq = XL_MA_TRAN.Max(a); String Chuoi; Chuoi = "Ma tran cac so nguyen\n"; Chuoi = Chuoi + XL_MA_TRAN.Chuoi(a) + "\n"; Chuoi = Chuoi + "Co so nguyen lon nhat la: " + kq; XL_CHUOI.Xuat(Chuoi); }
static void Main(string[] args) { ArrayList P; Double x0; Double kq; P = XL_DA_THUC.Nhap("Nhap da thuc P(x):\n"); x0 = XL_SO_THUC.Nhap("Nhap x0 = "); kq = XL_DA_THUC.Tinh_gia_tri(P, x0); String Chuoi; Chuoi = "Gia tri da thuc P(x)=" + XL_DA_THUC.Chuoi(P) + "\n"; Chuoi = Chuoi + "voi x0=" + x0 + " la :" + kq; XL_CHUOI.Xuat(Chuoi); }