Advertisement
Josif_tepe

Untitled

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