Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int a, b;
- double nghiem;
- cout << "nhap a=";
- cin >> a;
- cout << "nhap b=";
- cin >> b;
- if (a == 0) {
- if (b == 0) {
- cout << "phuong trinh co vo so nghiem";
- }
- else {
- cout << "phuong trinh vo nghiem";
- }
- }
- else {
- nghiem = (double)-b / a;
- cout << "phuong trinh co nghiem la" << nghiem;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement