fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a,b,c,i;
  5. scanf("%d %d %d",&a,&b,&c);
  6. if(a>b)
  7. {
  8. a += b;
  9. b = a - b;
  10. a = a - b;
  11. }
  12. for(i=a;i<b+1;i++)
  13. {
  14. if(c % i == 0)
  15. {
  16. printf("%d ",i);
  17. }
  18. }
  19.  
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0.01s 5292KB
stdin
3
9
12
stdout
3 4 6