Advertisement
Josif_tepe

Untitled

Jan 20th, 2024
880
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.34 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.    
  6.     int a, b;
  7.     cin >> a;
  8.     cin >> b;
  9.    
  10.     if(a == 0 and b == 0) {
  11.         cout << "ima beskonecno resenija" << endl;
  12.     }
  13.     else if(a == 0 and b != 0) {
  14.         cout << "nema resenie" << endl;
  15.     }
  16.     else {
  17.         cout << -b/a << endl;
  18.     }
  19.     return 0;
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement