mitkonikov

Eva Homework 2

Mar 1st, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     float a, b;
  8.  
  9.     cin >> a >> b;
  10.  
  11.     if (a == 0 && b != 0) {
  12.         cout << "Ravenkata nema reshenie" << endl;
  13.     } else if (a == 0 && b == 0) {
  14.         cout << "Ravenkata ima beskonechno mnogu reshenija" << endl;
  15.     } else {
  16.         float x = -b/a;
  17.         cout << x << endl;
  18.     }
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment