慕用4063026
有点看不清你的,按照你的源码编的,运行没问题啊:#include <stdio.h>int main(void) { int x,y,i; for(i=101;i<200;i++){ for(x=2,y=1;i>x;x++){ if(i%x==0){ y=0; break; } } if(y==1) printf("%d is prime\n",i); else printf("%d is not prime\n",i); } printf("test"); return 0;}输出:101 is prime102 is not prime103 is prime104 is not prime105 is not prime106 is not prime107 is prime108 is not prime109 is prime110 is not prime111 is not prime112 is not prime113 is prime114 is not prime115 is not prime116 is not prime117 is not prime118 is not prime119 is not prime120 is not prime121 is not prime122 is not prime123 is not prime124 is not prime125 is not prime126 is not prime127 is prime128 is not prime129 is not prime130 is not prime131 is prime132 is not prime133 is not prime134 is not prime135 is not prime136 is not prime137 is prime138 is not prime139 is prime140 is not prime141 is not prime142 is not prime143 is not prime144 is not prime145 is not prime146 is not prime147 is not prime148 is not prime149 is prime150 is not prime151 is prime152 is not prime153 is not prime154 is not prime155 is not prime156 is not prime157 is prime158 is not prime159 is not prime160 is not prime161 is not prime162 is not prime163 is prime164 is not prime165 is not prime166 is not prime167 is prime168 is not prime169 is not prime170 is not prime171 is not prime172 is not prime173 is prime174 is not prime175 is not prime176 is not prime177 is not prime178 is not prime179 is prime180 is not prime181 is prime182 is not prime183 is not prime184 is not prime185 is not prime186 is not prime187 is not prime188 is not prime189 is not prime190 is not prime191 is prime192 is not prime193 is prime194 is not prime195 is not prime196 is not prime197 is prime198 is not prime199 is primetest