Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int nbDiviseurs3 (int a)
- {
- int result = 2;
- int borne = 2;
- int i = 2;
- if (a%2 != 0)
- borne = 3;
- if (sqrt(a) == floor(sqrt(a)))
- result++;
- for (int i = 2; i*i < a; i++)
- {
- if (a%i == 0)
- result = result + 2;
- }
- return result;
- }
Add Comment
Please, Sign In to add comment