Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  oo
Language: C/C++
Code:
#include <iostream.h>
#include<conio.h>
#include<string.h?
int main(int argc, char *argv[])
{
#include <iostream>
#include <string.h>



void main()
{
    char name[10];
    cout<<"Enter the string";
    cin>>name;
     int len=strlen(name);
    int flag;
    int l=len;
    int i;
     
      for(i=0;i<len;i++)
      {
          if(name[i]==name[l-1])
              flag=1;
          else
          {
              flag=0;
               break;
          }
          l=l-1;
      }
    if (flag==1)
        cout<<"The string is pallindrome";
    else
        cout<<"The string is not pallindrome";
    getch();
     
}

     
}
          
          
Comments: