Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int from,to;
- int obratenbroj;
- int cifra;
- scanf("%d %d", &from, &to);
- int broj;
- int temp;
- broj=from;
- while(broj<to){
- //for(broj=from;broj<to;broj++){
- obratenbroj=0;
- temp=broj;
- while(temp>0){
- cifra=temp%10;
- obratenbroj=obratenbroj*10+cifra;
- temp=temp/10;
- }
- if(broj==obratenbroj){
- printf("%d\n", broj);
- }
- broj++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement