Thursday, May 19, 2022

TO CHECK THE NO IS PARDONILM OR NOT #THEHACKERS@

 #include<iostream>

using namespace std;


int main()

{

    int n,num, digit,rev=0;

    cout<<" enter the positive number :";

    cin>>num;

    n=num;

    do

    {

     digit = num%10;

     rev = (rev*10)+digit;

     num=num/10;

    }while(num!=0);

    

    cout<<" the rev of the no is :"<<rev<<endl;

    if(n == rev)

    {

        cout<<" the number is pardorilm";

    }

    else

    {

        cout<<" the number is not pardorilom";

    }

    return 0;

    

}

No comments:

Post a Comment

CONSTRUCTURE IN PARENT CLASS

class Parent {     public Parent()     {         System.out.println("Parent Constrcutor");     }              } class Child extend...