摘要:1 //判断一个数字是否是素数(素数只能被1和它自己整除) 2 #include 3 #include 4 int main(){ 5 int num; 6 int flag=0; 7 printf("输入一个数字:\n"); 8 scanf("%d",&num); 9 for(int i=2;i<=sqrt(num);i++){ 1...
阅读全文
posted @ 2018-06-24 10:45
posted @ 2018-06-24 10:45
posted @ 2018-06-24 10:33
posted @ 2018-06-24 10:31
posted @ 2018-06-24 10:30
posted @ 2018-06-24 10:28