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

Computer Science & Information Technology

You might also like to view...

The map collection has a ‘get’ operation. Why doesn’t the set collection have a ‘get’ operation?

What will be an ideal response?

Computer Science & Information Technology

Which of these is NOT part of the DVD video specification?

a. 720 pixels per horizontal line. b. Multiple audio tracks. c. Multiple text tracks. d. Set-top gaming support. e. Dolby AC-3 Digital Surround Sound.

Computer Science & Information Technology

What type of forensic investigation typically has the highest evidentiary standards?

A. Administrative B. Criminal C. Civil D. Industry

Computer Science & Information Technology

The four layers of the learning continuum as summarized by NIST SP 800-16 are: security awareness, security basics and literacy, roles and responsibilities relative to IT systems, and the _________ level.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology