memesearch
Palindrome Program Checks Itself

Palindrome Program Checks Itself

Download Find similar pictures
Text on the meme
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"; }
What it means

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.

Objects
Tags
Sources
Type
image
Size
800×793 · 80.7 KiB
Mood
саркастичный
Language
en
Added

Similar memes