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