/* * Author: Amit Dutta (amitdutta4255@gmail.com) | Date: 12 Dec 2025 * Repo: https://github.com/notamitgamer/bsc * License: MIT */ /* Print all the 3 and 4 digit palindrome number. */ /* Auhtor: Amit Dutta, Date: 20-11-2025 */ // This code has not been compiled. // If you find any issues, please create a new issue on GitHub regarding them. // Go to this link to create a new issue: https://github.com/notamitgamer/bsc/issues #include int palindromeCheck(int); int palindromeCheck(int n) { int temp = n, rev = 0; while (temp > 0) { rev = (rev * 10) + (temp % 10); temp /= 10; } if (rev == n) return 1; else return 0; } int main() { int i; printf("Palindrome number of 3 and 4 digits: "); for (i = 100; i <= 9999; i++) if (palindromeCheck(i)) printf("%d ", i); return 0; }