// multiples.cpp #include // allows program to perform input and output using std::cout; // program uses cout using std::endl; // program uses endl using std::cin; // program uses cin int main() { /* Write variables declarations here */ // ENTER THE CODE BELOW int number1, number2; number1 = number2 = 0; //(initializing variables) cout << "Enter two integers: "; // prompt /* Write a cin statement to read data into variables here */ // ENTER THE CODE BELOW cin >> number1 >> number2; // using modulus operator // WRITE THE CODE INSIDE THE ( ) // RECALL: 30 % 5 gives an answer of 0, so 30 is a multiple of 5 // 32 % 5 gives an answer of 2, (not 0) so 32 is NOT a multiple of 5 /* Write a condition that tests whether number1 is a multiple of number2 */ if (number1 % number2 == 0) // ENTER THE CODE INSIDE THE ( ) cout << number1 << " is a multiple of " << number2 << endl; /* Write a condition that tests whether number1 is not a multiple of number2 */ if (number1 % number2 != 0) // ENTER THE CODE INSIDE THE ( ) cout << number1 << " is not a multiple of " << number2 << endl; return 0; // indicate successful termination } // end main /* Enter two integers: 42 14 42 is a multiple of 14 Press any key to continue . . . Enter two integers: 12 36 12 is not a multiple of 36 Press any key to continue . . . Enter two integers: 20 20 20 is a multiple of 20 Press any key to continue . . . Enter two integers: 18 7 18 is not a multiple of 7 Press any key to continue . . . */