Advertisement
Josif_tepe

Untitled

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