MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / main

Function main

CPP/questions/pali.cpp:9–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#define endl '\n'
8
9int main(){
10 cin.tie(0)->sync_with_stdio(0);
11 int n;
12 cin>>n;
13 int temp=n;
14 int ans=0;
15 while(n!=0){
16 ans=ans*10+(n%10);
17 n/=10;
18 }
19 if(ans==temp)
20 cout<<"it is palindrome "<<endl;
21 else
22 cout<<"it is not pali"<<endl;
23
24 return 0;
25}
26
27

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected