Check Whether Given Number is Palindrome or Not ????
#include<stdio.h> #include<string.h> int main() { int num,i,count=0; char str1[10],str2[10]; printf("\nEnter a number:"); scanf("%d",&num); sprintf(str1,"%d",num); // Convert Number to String strcpy(str2,str1); // Copy String into Other strrev(str2); // Reverse 2nd Number count = strcmp(str1,str2); if(count==0) printf("%d is a prime number",num); else printf("%d is not a prime number",num); return 0; }
Incoming search terms:
- 1) Palindrome FLOWCHART (1)
- flowchart to find whether it is palindrome or not (1)
- flowchart to reverse a string and check whether it is palindrome or nor in c (1)
- flowchart which will accept a no and ceck wheather it is palindrom or not (1)
- flowcharts for palindrome (1)
- how execution of palindrome number in c (1)