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