fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int n,i=1,souseki=1;
  5. scanf("%d",&n);
  6. printf("%d",i);
  7. while(i<n){
  8. i=i+1;
  9. souseki=souseki*i;
  10. printf("x%d",i);
  11. }
  12.  
  13. printf("=%d",souseki);
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5316KB
stdin
4
stdout
1x2x3x4=24