fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int32_t main() {
  5. int a, b;
  6. cin >> a >> b;
  7.  
  8. if(a == 0) {
  9. if(b == 0) cout << "Vo so nghiem";
  10. else cout << "Vo nghiem";
  11. } else {
  12. cout << "Phuong trinh co 1 nghiem: x = " << (double)(-b) / a;
  13. }
  14.  
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
Phuong trinh co 1 nghiem: x = -3.76108e-05