Back
Phuong_Trinh_Bac_1.cpp
Save
// Phuong_Trinh_Bac_1.cpp #include
#include
using namespace std; int main(int argc, char** argv) { 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"; } } return 0; }