Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int obraten (int n, int obt)
- {
- if(n==0)
- {
- return obt;
- }
- else {
- obt=obt*10+n%10;
- return obraten(n/10,obt);
- }
- }
- int main()
- {
- int n, sum=0;
- scanf("%d", &n);
- sum = n+obraten(n,0);
- if( sum== obraten(sum,0))
- {
- printf("E palindrom");
- }
- else
- {
- printf("Ne e palindrom");
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment