判断素数
来源:互联网 发布:python获取字符串长度 编辑:程序博客网 时间:2024/05/18 23:26
#include <stdio.h>#include <iostream>#include <math.h>using namespace std;int main(){int n;scanf("%d",&n);int flag=1;for(int i=2;i<=sqrt(n);i++){if(n%i==0){flag=0;}}if(flag)printf("This is a prime.\n");elseprintf("This is not a prime.\n");return 0;}
0 0
- 素数判断
- 判断素数
- 判断素数
- 判断素数
- 素数判断
- 判断素数
- 判断素数
- 判断素数
- 判断素数
- 判断素数
- 判断素数
- 素数判断
- 判断素数
- 判断素数
- 判断素数
- 判断素数
- 判断素数
- 判断素数
- 《Head First Java》读书笔记(1)
- JSON中的{}与[]
- As-Conformal-As-Possible Surface Registration
- JS刷新当前页面的几种方法总结
- HDU 1577 判断两点之间是否存在整数点
- 判断素数
- win7 64位+vs2010+opencv2.4.10+cmake3.6编译报错的解决
- SWF2入门(一)
- pushlet工作原理
- OpenCV学习笔记(二):存取像素
- SWF2入门(二)
- 数据库异常整理:org.hibernate.QueryException: could not resolve property: “xxx”
- ZooKeeper入门介绍
- Spring Overview