Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- int n1,n2,i,j;
- cin>>n1;
- cin>>n2;
- for(i=n1;i<=n2;i++)
- {
- for(j=2;j<n1;j++)
- {
- if(i%j==0)
- {
- cout<<i<<"prime number\n";
- }
- else {
- cout<< i<<"not prime number";
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement