Guest User

Untitled

a guest
Oct 16th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. int nbDiviseurs3 (int a)
  2. {
  3.     int result = 2;
  4.  
  5.     if (sqrt(a) == floor(sqrt(a)))
  6.         result++;
  7.  
  8.     for (int i = 2; i*i < a; i++)
  9.     {
  10.         if (a%i == 0)
  11.             result = result + 2;
  12.     }
  13.     return result;
  14. }
Add Comment
Please, Sign In to add comment