fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int a,b,c,i,k;
  6. scanf("%d %d %d",&a,&b,&c);
  7.  
  8. for(i=a;i<=b;i++){
  9. if(c%i==0){
  10. k++;
  11. }
  12. }
  13.  
  14. printf("%dから%dの間に%dの約数は%d個ある",a,b,c,k);
  15.  
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5304KB
stdin
1
10
20
stdout
1から10の間に20の約数は5個ある