Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions CPP/strings/palindorme.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//author : seema Kumari patel
//date : 02-10-2025
//purpose: To check whether the given string is palindrome or not


#include<bitset/stdc++.h>

using namespace std;

void main()
{
string s;
cout<<"Enter the string : ";
cin>>s;
int n=s.length();
int flag=0;
for(int i=0;i<n/2;i++)
{
if(s[i]!=s[n-i-1])
{
flag=1;
break;
}
}
if(flag==0)
{
cout<<"The given string is palindrome"<<endl;
}
else
{
cout<<"The given string is not palindrome"<<endl;
}
}
Loading