Untitled
unknown
plain_text
a year ago
394 B
12
Indexable
#include <stdio.h>
int revenum(int num) {
int reve = 0;
while(num > 0) {
reve = reve * 10 + (num % 10);
num = num / 10;
}
return reve;
}
int main() {
int a, b, c;
scanf("%d %d", &a, &c);
b = revenum(c);
if (a == b) {
printf("palindrome\n");
} else {
printf("not palindrome\n");
}
return 0;
}
Editor is loading...
Leave a Comment