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