Menu
Coddy logo textTech

Challenge #2

Lesson 22 of 23 in Coddy's C++ File Handling course.

challenge icon

Challenge

Medium

Write a program that for 5 given strings in the file input.txt outputs Palindrome if the string is a palindrome and Not a palindrome if it isn't.
A palindrome is a word that reads the same backwards as forwards

Input
ABBA
THREE
SHOPPOHS
MAMA
CODDY

Output
Palindrome
Not a palindrome
Palindrome
Palindrome
Not a palindrome

Try it yourself

#include <iostream>
#include <fstream>

using namespace std;
 
int main()
{
    
    // Enter your code here
 
    return 0;
}

All lessons in C++ File Handling