Showing posts with label Palindrome. Show all posts
Showing posts with label Palindrome. Show all posts

Wednesday 13 November 2013

Palindrome


Palindrome Problem


A palindrome is a word that reads the same both forwards and backwards.
Examples: anna, nitalarbralatin, amanaplanacanalpanama.

Program -

#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
void main()
{char a[20],b[20];
cout<<"enter the string"<<endl;
gets(a);
strcpy(b,a);
strrev(b);
if(strcmpi(a,b)==0)
cout<<"palindrome"<<endl;
else
cout<<"nay"<<endl;
getch();
}

Artificial Intelligence (AI)

  Artificial Intelligence (AI) The Power and Potential of Artificial Intelligence Artificial Intelligence (AI) is revolutionizing the world ...