velimir

SreknaGodina

Mar 25th, 2013
111
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. {
  7.     int g, g1, g2, g3, g4;
  8.     cin >> g;
  9.     g1 = g%10;
  10.     g/=10;
  11.     g2 = g%10;
  12.     g/=10;
  13.     g3 = g%10;
  14.     g/=10;
  15.     g4 = g%10;
  16.     g/=10;
  17.     if(g1==g2 or g1==g3 or g2==g4 or g2==g3 or g4==g1 or g3==g4) cout << "DA";
  18.     else cout << "NE";
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment