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
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;
}
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;
}
Similar questions
Physics,
8 months ago
Environmental Sciences,
8 months ago
Hindi,
8 months ago
Math,
1 year ago
Social Sciences,
1 year ago
Math,
1 year ago
Biology,
1 year ago
English,
1 year ago