fork(1) download
  1. #include <stdio.h>
  2. int insu(int n){
  3. int i;
  4. for(i=2;i<n;i++){
  5. if(n%i==0){
  6. insu(n/i);printf("%d×",i);}
  7. else if(n==1)
  8. return 0;
  9.  
  10. }
  11. }
  12. int main() {
  13. int x;
  14. printf("3以上の整数を入力してください:");
  15. scanf("%d",&x);
  16. printf("%d\n%d=",x,x);
  17. insu(x);
  18. printf("\n続行するには何かキーを押してください...");
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0.01s 5320KB
stdin
1
stdout
3以上の整数を入力してください:1
1=
続行するには何かキーを押してください...