标签:错误 include int == bre c语言练习 i++ can code
#include<stdio.h> /*题目:求100以内素数*/ int main(){ int i,j,k,m,n; lop: while(1){ printf("——列出m-n之间素数——\n请输入起始数:"); scanf("%d",&m); if(m<=1){ printf("输入错误,请重新输入"); goto lop;} printf("请输入终止数:"); scanf("%d",&n); for(i=m;i<=n;i++){ k=0; for(j=2;j<i;j++) if(i%j==0){ k=1; break; } if(k==0) printf("%d ",i); } printf("\n________________________________\n"); } return 0; }
标签:错误 include int == bre c语言练习 i++ can code
原文地址:https://www.cnblogs.com/gougouwang/p/11437305.html