fork download
  1. #include <stdio.h>
  2. int people(int n){
  3. int i,j;
  4. scanf("%d", &n);
  5. for(i=1;i<=n;i++){
  6. if(n%i==0){
  7. printf("%d\n", i);
  8. } }
  9. }
  10. int main(){
  11. int x;
  12. people(x);
  13.  
  14. }
Success #stdin #stdout 0s 4772KB
stdin
720
stdout
1
2
3
4
5
6
8
9
10
12
15
16
18
20
24
30
36
40
45
48
60
72
80
90
120
144
180
240
360
720