Computer Science, asked by raj262kum, 1 year ago

write a cprogram to enter a string and find whether given string is palindrome or not without using any library function


ani99ket: i dont have a knowledge of c but if u want i can give u an idea how to do it

Answers

Answered by aditi140
2
# include<iostream>
using namespace std;
int main()
{
int i,n,no,b;
cin>>n;
no=n;
r=0;
while (n!==0)
{
b=n%10;
r=r*10+b;
n=n%10;
}
if (no==r)
cout<<"the no. is palindrome";
return 0;
}

aditi140: i had a mistake
Similar questions