Advertisement
Josif_tepe

Untitled

Oct 27th, 2023
654
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     int broj1, broj2;
  7.     cin >> broj1 >> broj2;
  8.    
  9.     int sredna_cifra1 = (broj1 / 10) % 10;
  10.     int sredna_cifra2 = (broj2 / 10) % 10;
  11.    
  12.     if(sredna_cifra1 == sredna_cifra2) {
  13.         cout << "DA" << endl;
  14.     }
  15.     if(sredna_cifra1 > sredna_cifra2) {
  16.         cout << "NE" << endl;
  17.     }
  18.     if(sredna_cifra1 < sredna_cifra2) {
  19.         cout << "NE" << endl;
  20.     }
  21.     return 0;
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement