Rename palindrome.cpp to ishitavarshney.cpp

This commit is contained in:
Luke Oliff
2018-10-08 17:55:43 +01:00
parent 59e725994f
commit 81b19b95ad

22
code/ishitavarshney.cpp Normal file
View File

@@ -0,0 +1,22 @@
#include <iostream>
using namespace std;
int main()
{
long a,rev,b;
cout<<"\nenter the number :";
cin>>a;
b=a;
rev=0;
while(b)
{
rev=(rev*10)+(b%10);
b=b/10;
}
if(a==rev)
cout<<"\n the number IS a palindrome.";
else
cout<<"\n the number IS NOT a palindrome.";
return 0;
}