Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int check(int a)
- {
- int ultano;
- for(;a>0;a=a/10)
- {
- ultano=ultano*10+a%10;
- }
- if (ultano==a)
- {
- return 1;
- }
- else
- {
- return 0;
- }
- }
- int main()
- {
- int a,b;
- printf("enter lower limit:");
- scanf("%d",&a);
- printf("enter upper limit:");
- scanf("%d",&b);
- for(int i=a;i<=b;i++)
- {
- if(check(i))
- {
- printf("%d\n",i)
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement