Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int n;
- scanf("%d", &n);
- int prevrten_broj = 0;
- int tmp = n;
- while(tmp > 0) {
- int cifra = tmp % 10;
- tmp /= 10;
- prevrten_broj = (prevrten_broj * 10) + cifra;
- }
- if(n == prevrten_broj) {
- printf("PALINDROM\n");
- }
- else {
- printf("NE E PALINDROM\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement