#include
#include
main()
{
char a[100], b[100];
printf("Enter the string to check if it is a palindrome\n");
gets(a);
strcpy(b,a);
strrev(b);
if( strcmp(a,b) == 0 )
printf("Entered string is a palindrome.\n");
else
printf("Entered string is not a palindrome.\n");
return 0;
}
이렇게 하면 결과 나와야하는거 아니에요...?
#include
main()
{
char a[100], b[100];
printf("Enter the string to check if it is a palindrome\n");
gets(a);
strcpy(b,a);
strrev(b);
if( strcmp(a,b) == 0 )
printf("Entered string is a palindrome.\n");
else
printf("Entered string is not a palindrome.\n");
return 0;
}
이렇게 하면 결과 나와야하는거 아니에요...?
스트링 헤더 파일 인클루드 햇니
복붙했더니 왜 안 보이지... <stdio.h>랑 <string.h> 둘 다 있는 상태에요