রবিবার, ৭ ফেব্রুয়ারী, ২০১৬

Check palindrome solve by c++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;

int main()
{
    string str, a;
    cout << "Enter a string: ";
    cin >> str;
    a = str;
    reverse((str.begin()), (str.end()));
    if(a == str)
        cout << "Palindrome" << endl;
    else
        cout << "Not palindrome" << endl;
    return 0;
}


ahmed shuvo969

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন