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