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