From 4e93c81bbcf0a255cb0f9e14b5edf9f82316be30 Mon Sep 17 00:00:00 2001 From: Md Altamash <91662197+md1altamash@users.noreply.github.com> Date: Sat, 19 Oct 2024 19:09:07 +0530 Subject: [PATCH] Create prime_number --- C++/prime_number | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 C++/prime_number diff --git a/C++/prime_number b/C++/prime_number new file mode 100644 index 0000000..6a852ab --- /dev/null +++ b/C++/prime_number @@ -0,0 +1,14 @@ +//Write a program to print all prime number in between 1 to 100. +#include +using namespace std; +int main() +{ + int n; + for(n=2;n<=100;n++){ + if(n%2==0 || n%3==0 || n%5==0){ + continue; + + }else + cout<