Advertisement
Josif_tepe

Untitled

Oct 27th, 2023
696
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.42 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.         else {
  16.             cout << "NE" << endl;
  17.         }
  18.         return 0;
  19.     }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement