Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Commit

Permalink
Create prime_number
Browse files Browse the repository at this point in the history
  • Loading branch information
md1altamash authored Oct 19, 2024
1 parent 5aefa58 commit f5f0115
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions prime_number
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//Write a program to print all prime number in between 1 to 100.
#include<iostream>
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<<n<<endl;
}
}

0 comments on commit f5f0115

Please sign in to comment.