- 博客(0)
- 资源 (3)
空空如也
数据结构上机答案
数据结构上机答案,很好的参考资料,//文件名:exp1-1.cpp
#include <stdio.h>
#include <math.h>
bool prime(int n) //判断正整数n是否为素数
{
int i;
for (i=2;i<=(int)sqrt(n);i++)
if (n%i==0)
return false; //若n不是素数,则退出并返回false
retu
2013-06-21
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人