Suppose the input for number is 9. What is the output from running the following program?
```
#include
using namespace std;
int main()
{
cout << "Enter an integer: ";
int number;
cin >> number;
int i;
bool isPrime = true;
for (i = 2; i < number && isPrime; i++)
{
if (number % i == 0)
{
isPrime = false;
}
}
cout << "i is " << i << endl;
if (isPrime)
cout << number << " is prime" << endl;
else
cout << number << " is not prime" << endl;
return 0;
}
```
A. i is 3 followed by 9 is not prime
B. i is 3 followed by 9 is prime
C. i is 4 followed by 9 is prime
D. i is 4 followed by 9 is not prime
D. i is 4 followed by 9 is not prime
You might also like to view...
The ________, when outlined in black, indicates it is ready to accept data
A) active cell B) status bar C) fill handle D) data point
?Because of the complexities of the associated issues and the seriousness with which companies approach their responsibilities relating to these issues, the _____ for social networking sites contain vast amounts of information.
A. ?Privacy Policies B. ?Data Policies C. ?both a and b D. ?neither a nor b