From dbca0f836c4a8dc5aeee31f655a544cebddd72d7 Mon Sep 17 00:00:00 2001 From: hehe Date: Sat, 21 Mar 2026 07:26:56 -0400 Subject: [PATCH] =?UTF-8?q?=E9=95=87=E4=B9=83=E5=A4=A9=E5=AD=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 260314/100以内的素数.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 260314/100以内的素数.cpp diff --git a/260314/100以内的素数.cpp b/260314/100以内的素数.cpp new file mode 100644 index 0000000..d85b2b9 --- /dev/null +++ b/260314/100以内的素数.cpp @@ -0,0 +1,20 @@ +#include +using namespace std; +int main(){ + + for(int i=2;i<100;i++){ + bool n=true; + + for(int j=2;j*j<=i;j++){ + + if(i%j==0){ + n=false; + break; + } + } + if(n) + cout<