fork download
  1. #include <stdio.h>
  2. int main() {
  3. int a,b,c ,count;
  4. scanf("%d",&a);
  5. scanf("%d",&b);
  6. scanf("%d",&c);
  7. count=0;
  8. while(a<=b){
  9. if(c%a==0){
  10. count++;}
  11. a++;
  12. }
  13.  
  14. printf("cの約数は%dである",count);
  15. //ここに作成
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0.01s 5324KB
stdin
1 10 24
stdout
cの約数は6である