Enter your email address:


Monday, September 2, 2013

Home » , » WAP to check a string is Caliondrome or not. // Maventic question.

WAP to check a string is Caliondrome or not. // Maventic question.


21. .WAP to check a string is Caliondrome or not. // Maventic question.
#include
#include
void main()
{
int i,j=0; char a[100];
clrscr();
printf("\n Enter the string to check for caliondrom e:\n");
gets(a);

if(strlen( a)%6)
{
printf("\n %s: is Not a caliondrom e..",a);
getch();
exit(0);
}
for (i=0;a[i]! ='\0'
{
if((a[i]== a[i+5])&&( a[i+1]==a[ i+4])&&(a[ i+2]==a[i+ 3]))
i=i+6;

else
{
j=1;
break;
}
}
if(j)
printf("\n %s: is Not a caliondrom e..",a);
else
printf("\n %s: is a caliondrom e..",a);
getch();
}

Share this games :

0 comments:

Post a Comment

Related Posts