its not printing prime
#include
using namespace std;
int main(){
int n;
cin>>n;
for(int i=2;i<n;i++){
if(n%i==0) {cout<< “not prime”;
break;
}
if(n==i){
cout<<" prime ";
}
}
return 0;
}
Code of prime numbers
Hey @pmschhabra
write the statement
if(i==n) outside the for loop coz i will never be n inside the for loop, inside the for loop i goes from 2 to n-1.
Proof of the Twin primes Conjecture and Goldbach’s conjecture We can find infinite prime numbers with the separation we want and we can express every even number as the sum of two prime numbers.
Proof of the Twin Primes conjecture and Goldbach´s conjecture