编写函数判断一个数是否是素数,并调用该函数输出1~100之间的素数?<script type="text/javascript">zhishu()function zhishu(){var str=""
编写函数判断一个数是否是素数,并调用该函数输出1~100之间的素数?
编写一个函数判断一个数是否是素数并在主函数?
#include{
int?m
for(m=2m
if(a%m==0)?break
if(m
else?printf("%d是[练:shì]素数 ",a)
}
void?main()
printf("请输(繁:輸)入一个整数:")
scanf("%d",&a)
本文链接:http://21taiyang.com/SoccerSports/1391878.html
判断一个数是否[fǒu]为素数的程序转载请注明出处来源