(Product of Odd Integers) Write a program that uses a for statement to calculate and print the product of the odd integers from 1 to 15.
What will be an ideal response?
```
// Calculate and print product of odd integers from 1 to 15.
#include
using namespace std;
int main()
{
int product = 1;
// calculate product
// increment counter i by 2 for odd numbers
for ( int i = 3; i <= 15; i += 2 )
product *= i;
// display resulting product
cout << "Product of the odd integers from 1 to 15 is: "
<< product << endl;
} // end main
```
You might also like to view...
Examine the overall size of your game on screen (pixel by pixel). What percentage of your screen real estate should be dedicated to your user interface?
What will be an ideal response?
Define what is meant by closed interview questions. Give six benefits and four drawbacks of using them.
What will be an ideal response?
Sam wants to ensure that the tone of his informational e-mail matches his intent. He should
a. delete the e-mail and phone the recipient instead b. read the message aloud to himself c. wait 72 hours before sending the message d. include several exclamation points to express enthusiasm
Security testers can use Hping to bypass filtering devices.
a. true b. false