static void Main(string[] args) { do { int n = SoNguyen.NhapSoNguyenDuong("Nhap n = "); Console.Write("S(" + n + ") = " + TinhToan.Tinh(n)); } while (SoNguyen.NhapSoNguyen("\nTiep tuc(1.Tiep, 0.Khong)?") != 0); }
static void Main(string[] args) { do { float x = SoThuc.NhapSoThuc("Nhap x = "); int n = SoNguyen.NhapSoNguyenDuong("Nhap n = "); Console.Write("T(" + x + "," + n + ") = " + TinhToan.Tinh(x, n)); } while (SoNguyen.NhapSoNguyen("\nTiep tuc (1.Tiep, 0.Khong) ?") != 0); }
private void button_equal_Click(object sender, EventArgs e) { phimbang = true; kq = TinhToan.Tinh(chuoi1, pheptinh, chuoi2).ToString(); float kq2 = float.Parse(kq); string thoigian = DateTime.Now.ToString("yyyy/MM/dd hh:mm"); // ScreenButtom.Text = thoigian.ToString(); hienthi(); SqlConnection con = new SqlConnection("server=k45A;database=maytinh;Integrated security=true;"); SqlCommand cmd = new SqlCommand("insert into cal(kq,thoigian) values('" + kq2 + "','" + thoigian + "')", con); con.Open(); cmd.ExecuteNonQuery(); con.Close(); test = true; }