Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int main()
- {
- int a, b, d = 0,N=0,i;
- cin >> a >> b;
- N = b - a + 1;
- int* d = new int[N];
- if (a <= 0 || b <= 0) cout << "error";
- else
- {
- for (int k = 0; k < N; k++) {
- for (i = a; i <= b; i++)
- for (int j = 1; j <= a; j++)
- if (i % j == 0) d[i - a] = d[i - a] + 1;
- }
- }
- }
Add Comment
Please, Sign In to add comment