验八 函数
2014-03-26 17:41
281 查看
源程序如下:
mian()
{
int number;
printf(“请输入一个正整数:\n”);
scanf(“%d”,&number);
if (prime(number))
printf(“\n %d是素数.”,number);
else
printf(“\n %d不是素数.”,number);
}
int prime(number) /*此函数用于判别素数*/
int number;
{
int flag=1,n;
for(n=2;n<number/2&&flag==1;n++)
if (number%n==0)
flag=0;
return(flag);
}
http://www.fengone.com/bj/jsqy/2014/0326/417221.html http://www.changsha.cn/bj/yl/zxjs/2014/0326/526522.html http://www.lfxww.com/2014/shichangshangxun/2014/0326/735632.html http://www.changsha.cn/bj/yl/ylzx/2014/0326/526523.html http://www.zznews.cn/hyzx/xywy/5205607453.html http://www.changsha.cn/bj/yl/xywy/2014/0326/526524.html http://www.zznews.cn/hyzx/jkxx/5205842551.html http://www.js0573.com/yx/oxlx/3639468.html http://www.js0573.com/yx/jghy/3636209.html http://www.zznews.cn/hyzx/xywy/5211320081.html http://www.zznews.cn/hyzx/mswh/5209203388.html http://www.lfxww.com/2014/shichangshangxun/2014/0326/735666.html http://www.fengone.com/bj/jsqy/2014/0326/418173.html http://www.js0573.com/yx/jghy/3630017.html http://www.js0573.com/yx/oxlx/3639801.html http://www.lfxww.com/2014/shichangshangxun/2014/0326/734932.html http://www.zznews.cn/hyzx/xywy/5209231014.html http://www.js0573.com/yx/jghy/3642110.html http://www.qdxw.com.cn/yx/jsyz/1940482.html http://www.js0573.com/yx/oxlx/3639107.html http://www.lfxww.com/2014/shichangshangxun/2014/0326/736383.html http://www.qdxw.com.cn/yx/jsyz/1940516.html http://www.js0573.com/yx/oxlx/3639821.html http://www.js0573.com/yx/oxlx/3639856.html http://www.changsha.cn/bj/yl/ylzx/2014/0326/530644.html http://www.zznews.cn/hyzx/jkxx/5211749172.html http://www.zznews.cn/hyzx/jkxx/5211749172.html
mian()
{
int number;
printf(“请输入一个正整数:\n”);
scanf(“%d”,&number);
if (prime(number))
printf(“\n %d是素数.”,number);
else
printf(“\n %d不是素数.”,number);
}
int prime(number) /*此函数用于判别素数*/
int number;
{
int flag=1,n;
for(n=2;n<number/2&&flag==1;n++)
if (number%n==0)
flag=0;
return(flag);
}
http://www.fengone.com/bj/jsqy/2014/0326/417221.html http://www.changsha.cn/bj/yl/zxjs/2014/0326/526522.html http://www.lfxww.com/2014/shichangshangxun/2014/0326/735632.html http://www.changsha.cn/bj/yl/ylzx/2014/0326/526523.html http://www.zznews.cn/hyzx/xywy/5205607453.html http://www.changsha.cn/bj/yl/xywy/2014/0326/526524.html http://www.zznews.cn/hyzx/jkxx/5205842551.html http://www.js0573.com/yx/oxlx/3639468.html http://www.js0573.com/yx/jghy/3636209.html http://www.zznews.cn/hyzx/xywy/5211320081.html http://www.zznews.cn/hyzx/mswh/5209203388.html http://www.lfxww.com/2014/shichangshangxun/2014/0326/735666.html http://www.fengone.com/bj/jsqy/2014/0326/418173.html http://www.js0573.com/yx/jghy/3630017.html http://www.js0573.com/yx/oxlx/3639801.html http://www.lfxww.com/2014/shichangshangxun/2014/0326/734932.html http://www.zznews.cn/hyzx/xywy/5209231014.html http://www.js0573.com/yx/jghy/3642110.html http://www.qdxw.com.cn/yx/jsyz/1940482.html http://www.js0573.com/yx/oxlx/3639107.html http://www.lfxww.com/2014/shichangshangxun/2014/0326/736383.html http://www.qdxw.com.cn/yx/jsyz/1940516.html http://www.js0573.com/yx/oxlx/3639821.html http://www.js0573.com/yx/oxlx/3639856.html http://www.changsha.cn/bj/yl/ylzx/2014/0326/530644.html http://www.zznews.cn/hyzx/jkxx/5211749172.html http://www.zznews.cn/hyzx/jkxx/5211749172.html
相关文章推荐
- 正确地使用SAP的标准对话框函数
- 确定字符编码是否为UTF-8格式 函数 (1)
- PHP中header()函数使用说明
- 异步函数 活动对象
- oracle数据库常用的一些自定义函数
- PHP操作数组相关函数
- VB规定,消息类的调用函数只能放在模块内,即函数preWinProc只能放在模块内,否则必将出错。
- C++实现输出sin()函数图象
- PHP常用函数(数组) 收集
- error_reporting()函数用法
- linux下进程相关函数
- 矩阵中的数学旋转公式 转换到 C++中函数 替换DirectX 9.0中D3DXMatrixRotationAxis函数
- SystemInit()函数的结构分析
- Win32函数Sleep的精度测试
- CString的所有函数
- 导出函数使用
- C++ 函数参数是引用和指针的时候的一些注意点。
- jQuery扩展两类函数(对象调用,静态调用)
- cin相关函数