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