Hi guys, not sure why the below is not working!!! Help would be super useful thanks
#include
using namespace std;
int main() {
int lower_bound, upper_bound;
int prime_counter=0;
cout<<"Enter upper bound \n";
cin>>upper_bound;
cout<<"Enter lower bound \n";
cin>>lower_bound;
//while (lower_bound==upper_bound){
// cout<<"Enter upper bound \n";
// cin>>upper_bound;
// cout<<"Enter lower bound \n";
// cin>>lower_bound;
}
while (lower_bound < upper_bound){
//check if prime and output if so and add to prime counter
if (lower_bound%2==0){
lower_bound=+1;
}
else {
int place_holder=(lower_bound/2)+1;
int i;
for (i=1; i=(place_holder-1);i++){
if (lower_bound%i==0){
cout<<"Prime is "<<i<<" \n";
prime_counter=+1;
}
}
lower_bound=+1;
} }
cout<<"TOTAL Number of primes "<<prime_counter;
return 0;
}