C++/c++ primes numbers
one of my programs ish to display the number of primes bewteen two given numbers inputed by the users.
enter a starting number:50
enter a endling nunber:59
numbers of primes found in the range: 2
this ish what ii have so far::
/* primes in range chapter4ex11bb /*
cout<<"enter a starting number:";
cout<<"enter an ending number: ";
There are "<< g <<" prime numbers between "<< a <<" and "<< b;
This is because the range in the for loop is set to 50; But, I am not sure about this method. If you try dividing the each number after 10 by the following numbers( 2,3,4,5,.. 9) and check for the remainder. Then you will not have the above problem.