Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){
- int a, b, pom, pog, fl=1, c1;
- scanf("%d %d", &a, &b);
- if(a<=0 || b<=0)
- { printf("Invalid input");
- fl=0; }
- if(fl)
- {
- if(a<b)
- { pom=a;
- pog=b; }
- else if (b<a)
- { pom=b;
- pog=a; }
- while(pog)
- {
- pog=pog/10;
- // printf("pog e %d, pom e %d\n", pog, pom);
- if(pog%10==pom%10)
- c1++;
- // printf("c1 e %d\n", c1);
- pom=pom/10;
- pog=pog/10;
- // if(pom==0)
- // break;
- // printf("pom e %d\n", pom);
- }
- if(c1==0 || c1==1)
- printf("NE");
- if(c1>=2)
- printf("PAREN");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement