Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream.h>
- #include <conio.h>
- int main()
- {
- unsigned a,b,nr,i,x,c;
- cin>>a;cin>>b;
- nr=0;
- for(i=a; i<=b; i++)
- {
- x=i;
- c=x%10;
- while(x!=0 && x%10==c)
- {
- x=x/10;
- }
- if(x == 0)
- {
- nr++;
- }
- }
- cout<<nr;
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement