Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a,b,n,c,i,k;
- cin>>a;
- cin>>b;
- k=0;
- for(i=a;i<=b;i++)
- {
- n=i;
- c=0;
- while(n>0)
- {
- if(n%2==1)
- c=c+1;
- n=n/10;
- }
- if(c>0)
- k=k+1;
- }
- cout<<k;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement