Palindrome Program Checks Itself
Q: Write a program to check whether a word is palindrome or not. #include <iostream> using namespace std; int main() { string word1; string word2; cout << "Enter the word : "; cin >> word1; cout << "Enter it in the reverse order : "; cin >> word2; if(word1.compare(word2) == 0){ cout << word1 << " is palindrome"; } else { cout << word1 << " is not palindrome"; }
A C++ program asks the user to enter a word and then manually enter its reverse, comparing the two inputs to determine whether the word is a palindrome. The joke is that the program outsources the actual reversal and palindrome check to the user, making the solution hilariously redundant. It is shared as a reaction to lazy, overcomplicated, or joke programming solutions.
- @gentoomemes / 1146 2022-10-24
- @right_wing_dev_squads / 8493 2024-01-11
- Type
- image
- Size
- 800×793 · 80.7 KiB
- Mood
- саркастичный
- Language
- en
- Added