当前位置:网站首页>25.【判断是否是素数的方法】
25.【判断是否是素数的方法】
2022-07-21 05:05:00 【李在奋斗……】
#include <iostream>
using namespace std;
int main()
{
cout << "请输入一个数大于3的整数:" << endl;
int n;
cin >> n;
for (int i = 2; i <= n / 2; i++)
{
if (n % i == 0)
{
cout << "不是" << endl;
break;
}
else
{
cout << "是" << endl;
}
}
return 0;
}
边栏推荐
猜你喜欢
bert从入门到实践笔记本
合泰HT32 & 淘晶驰TJC--T0串口屏学习笔记
5. Paddlepaddle 10 lines of code deep learning image classification (cifar)
(environment configuration) TDD net
深度剖析 —— 结构体
【PCB】基于STM32F103RCT6摇杆-蓝牙模块开发板-画板笔记整理
记录关于写程序的一些个小芝士~【持续更~】
Amy-Tabb机器人世界手眼标定(3、论文分析)
小游戏类项目 —— 五子棋游戏
[PCB] production document sorting and output of circuit board drawing notes -- drawing board notes
随机推荐
[PCB] Based on Hetai ht32f52352 chip circuit board drawing experiment (WiFi and optical sensor module) - drawing board notes
深度剖析 string —— memcpy & memmove
使用MATLAB GUI 设计工具开发小项目
[PCB] 3.7V lithium battery -- 5V charge / discharge control circuit -- ip5306 -- drawing board notes
1027打印沙漏
Datalosserror: corrected record at XXXXXXX, Bert pre training error
(笔记)吴恩达深度学习L4W2
吴恩达深度学习L4W3目标检测
合泰HT32--淘晶驰TJC--T0串口屏学习笔记(二)
Hetai 32 onenet WiFi module - Hetai MCU data cloud through mqtt protocol (II)
The output coordinates of the target detection task are decimal
(笔记)吴恩达深度学习L4卷积神经网络W1
Stm32f407-ov7670 (no FIFO) -onenet- upload camera pictures to onenet (EDP protocol)
深度剖析 string —— strcmp & strncmp
STM32F407-OV7670(无FIFO)-ONENET-实现摄像头画面上传到onenet(EDP协议)
pycharm专业版创建flask项目|下载flask包|以及一些例子
namespace 命名空间
CONDA install datasets to avoid conflicting commands
Codeforces 1642B Power Walking
Examples of enumeration