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