Wednesday, 26 January 2022

C Program to Check Whether a Number is Palindrome or Not Palindrome :-

 MAIN PROGRAM:-
                     
  #include <stdio.h>

  void main()
 {
  int a, b, c, d=0;
  printf("enter any number");
  scanf("%d",&a);
  b=a;
  while (a>0)
  {    
     c=a%10;
     d=c+(d*10);
     a=a/10;
  }
  if(b==d)
  {  
     printf("Palindrome");
  }
  else
  {
     printf("not");
  }
  return 0;
}
        INPUT :-

                         

   OUTPUT :-
                     
                              



              




                                                                  --THANK YOU--


No comments:

Post a Comment

Infosys Process Executive Recruitment 2022 | Apply Now

  Infosys Process Executive Recruitment 2022 | Apply Now  Infosys Process Executive Recruitment 2022 |Infosys Recruitment 2022 | Work From H...