fork download
  1. #include <stdio.h>
  2. int main() {
  3. //ここを作成
  4. int i,j,a,b,count=0;
  5. a=2;
  6. b=9;
  7. for(i=2;i<a;i++){
  8. for(j=a;j>=b;j++){
  9. if(b%a==0)
  10. count++;
  11.  
  12. }
  13. }
  14. printf("a以上b以下にある素数の個数は%dである",count);
  15.  
  16.  
  17. return 0;
  18.  
  19. }
Success #stdin #stdout 0.01s 5312KB
stdin
stdout
a以上b以下にある素数の個数は0である