I'm currently trying to detect and print prime numbers. Here's what I've got for now, but I get an error from the compiler: non-lvalue in assignment, and I can't seem to be able to fix that. Any help?
Code:#include<iostream>
using namespace std;
int main() {
int i, j;
for(i=0; i<100; i++) {
for(j=0; j<i; j++) {
if(i%j=1 && i%j=i) {
cout<<"Prime"<<endl;
}
else {
cout<<"Not Prime"<<endl;
}
}
}
}
