What do you want to save?
Add Code snippet
New code examples
-
Other 2022-02-22 10:30:41
Write a program, which takes an array of characters from users. Your task is to check either it is palindrome or not.
n = input("Enter the word and see if it is palindrome: ") #check palindrome if n == n[::-1]: print("This word is palindrome") else: print("This word is not palindrome") Add solution -
Other 2021-11-20 15:26:14
Write a C program to check whether the string is a palindrome without using string functions.
#include <stdio.h>#include <string.h> int main(){ char text[100]; int begin, middle, end, length = 0; gets(text); while ( text[length] != '\0' ) length++; end = length - 1; middle = length/2; for( begin = 0 ; begin < ... Add solution -
Other 2021-11-18 04:25:18
Write a program to check whether inputted string is palindrome or not.
#include <stdio.h> #include <string.h> int main() { char s[1000]; int i,n,c=0; printf("Enter the string : "); gets(s); n=strlen(s); for(i=0;i<n/2;i++) { if(s[i]==s[n-i-1]) c++; ... Add solution