#include #include #include using namespace std; void BaiToan1() { int a,b; cout<<"Nhap 2 so nguyen a,b: "; cin>>a>>b; cout<<"Tong a + b la: "<>x; fx = (pow(x,2) + exp(x) + pow(sin(x),2)) / sqrt(pow(x,2) + 1); cout<<"F(x) = "<>tien; if (tien >= 200000 && tien <= 300000) { km = 20; } else if (tien > 300000) { km = 30; } else { km = 0; } tong = tien - tien*km/100; cout<<"So tien phai tra: "<>diem; if (diem < 0 || diem > 10) { cout<<"Diem khong hop le"; } else if (diem >= 8.0 && diem <= 10) { cout<<"Xep loai Gioi"; } else if (diem >= 7.0 && diem < 8.0) { cout<<"Xep loai Kha"; } else if (diem >= 5.0 && diem < 7.0) { cout<<"Xep loai Trung Binh"; } else if (diem >= 3.0 && diem < 5.0) { cout<<"Xep loai Yeu"; } else { cout<<"Xep loai Kem"; } } void BaiToan5() { float a,b; cout<<"Nhap gia tri a,b: "; cin>>a>>b; if (a != 0) { cout<<"Phuong trinh co 1 nghiem la x = "<<-b/a; } else { if (b == 0) { cout<<"Phuong trinh co vo so nghiem"; } else { cout<<"Phuong trinh vo nghiem"; } } } void BaiToan6() { int thang; cout<<"Nhap vao thang: "; cin>>thang; switch (thang) { case 1: case 3: case 5: case 7: case 8: case 10: case 12: cout<<"Thang co 31 ngay"; break; case 4: case 6: case 9: cout<<"Thang co 30 ngay"; break; case 11: case 2: cout<<"Thang co 28 ngay"; break; default: cout<<"Thang nhap vao khong hop le"; } } main() { int luachon; cout<<"\tMENU LUA CHON"<>luachon; switch (luachon) { case 1: BaiToan1(); break; case 2: BaiToan2(); break; case 3: BaiToan3(); break; case 4: BaiToan4(); break; case 5: BaiToan5(); break; case 6: BaiToan6(); break; case 0: exit(0); default: cout<<"Lua chon khong dung"; } }