#include #include #include int isPalindrome(int num) { char str[10]; sprintf(str, "%d", num); int len = strlen(str); for (int i = 0; i < len / 2; i++) { if (str[i] != str[len - 1 - i]) { return 0; } } return 1; } int main() { int N; printf("Enter a positive integer: "); scanf("%d", &N); if (isPalindrome(N)) { printf("%d is a black hole number.\n", N); } else { printf("%d is not a black hole number.\n", N); } return 0; }