The following program uses function multiple to determine whether the integer entered from the keyboard is a multiple of some integer X. Examine function multiple, then determine the value of X.
```
// This program determines if a value is a multiple of X.
#include
using namespace std;
bool multiple( int );
int main()
{
int y;
cout << "Enter an integer between 1 and 32000: ";
cin >> y;
if ( multiple( y ) )
cout << y << " is a multiple of X" << endl;
else
cout << y << " is not a multiple of X" << endl;
} // end main
// determine if num is a multiple of X
bool multiple( int num )
{
bool mult = true;
for ( int i = 0, mask = 1; i < 10; i++, mask <<= 1 )
if ( ( num & mask ) != 0 )
{
mult = false;
break;
} // end if
return mult;
} // end function multiple
```
The value of X is 1024.
You might also like to view...
What term is used to describe a review that involves presentation to a team or individual for examination prior to the actual review?
A. Inspection B. Informal review C. Walkthrough D. Casual review
When you add a spry effect to a page element, Dreamweaver automatically adds a(n) ____ to the site root folder with the supporting files located inside the folder.
A. Spry root folder B. Spry components folder C. SpryAssets folder D. AJAX folder
XML documents can be imported into Excel
Indicate whether the statement is true or false
When defining a project, one thing you should consider is whether or not the project can be developed within the client's budget.
Answer the following statement true (T) or false (F)