-
- Téléchargements
Add new directory
parent
44bb31b9
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Guillaume Poncin/.gitkeep
0 → 100644
Veuillez vous inscrire ou vous se connecter pour commenter
#include <stdio.h> #include <stdlib.h>
int* factorise (int N){ int i = 0; int n = N; int* fact = malloc((N-1) * sizeof(int));
for (int k = 2 ; k <= N ; k++){
while (n % k == 0){
n = n / k;
fact[i] = k;
i++;
}
}
return fact;
}