Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int prv,vtor;
- scanf("%d%d",&prv,&vtor);
- if(prv<=0||vtor<=0) printf("Invalid input");
- else
- {
- int pomoshno;
- if(prv>vtor)
- {
- pomoshno=prv;
- prv=vtor;
- vtor=pomoshno;
- }
- if(vtor>prv)
- {
- pomoshno=vtor;
- vtor=prv;
- prv=pomoshno;
- }
- int p=prv,z=1,celbroj=0;
- while(p)
- {
- if(!(z%2))
- {
- celbroj=celbroj*10+(p%10);
- }
- p=p/10;
- z++;
- }
- p=celbroj;
- int pomomo=0;
- while(p)
- {
- pomomo=pomomo*10+(p%10);
- p=p/10;
- }
- if(vtor==pomomo) printf("PAREN");
- else printf("NE");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement