Advertisement
Josif_tepe

Untitled

Mar 21st, 2024
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main() {
  4.     int n;
  5.     scanf("%d", &n);
  6.  
  7.     int tmp = n;
  8.     int broj = 0;
  9.     while(tmp > 0) {
  10.         int cifra = tmp % 10;
  11.         broj = (broj * 10) + cifra;
  12.         tmp /= 10;
  13.     }
  14.     printf("%d\n", broj);
  15.  
  16.     if(broj == n) {
  17.         printf("DA\n");
  18.     }
  19.     else {
  20.         printf("NE\n");
  21.     }
  22.     return 0;
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement