27 lines
393 B
C
27 lines
393 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int main(void){
|
|
int x = 0;
|
|
int i;
|
|
int j;
|
|
printf("Rentrer un entier: ");
|
|
scanf("%d",&x);
|
|
printf("%d = ",x);
|
|
while(x!=0){
|
|
for(j = 2;j<x;j++) {
|
|
for(i = 1;i<j;i++)
|
|
if (i==1){printf("");}
|
|
else{
|
|
if ((j%i)==0) {
|
|
i=2*j;
|
|
}
|
|
}
|
|
}
|
|
if(i!=(2*j)&&(x%j==0)){
|
|
x=x/j;
|
|
printf("%d*",j);
|
|
}
|
|
}
|
|
return EXIT_SUCCESS;
|
|
} |