subject

Write a function named is Multiple that determines for a pair of integers whether the second is a multiple of the first. The function should take two integer arguments and return true if the second is a multiple of the first, false otherwise. Use this function in a program that inputs a pair of integers. my answer true or false :)
#include
using namespace std;
int multiple( int, int );
int main()
{
int x, y;
for ( int i = 1; i <= 3; ++i ) {
cout << "Enter two integers: ";
cin >> x >> y;
if ( multiple( x, y ) )
cout << y << " is a multiple of " << x << "\n\n";
else
cout << y << " is not a multiple of " << x << "\n\n";
}
cout << endl;
return 0;
}
int multiple( int a, int b )
{
return !( b % a );
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:00
Meenu wants to create a high quality drawing in a variety of colours. which device should she use for the same?
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
Respond to the following in three to five sentences. select the workplace skill, habit, or attitude described in this chapter that you believe is most important for being a successful employee.
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
Where can page numbers appear? check all that apply. in the header inside tables in the footer at the bottom of columns at the top of columns
Answers: 1
question
Computers and Technology, 24.06.2019 13:30
Consider jasper’s balance sheet. which shows how to calculate jasper’s net worth?
Answers: 1
You know the right answer?
Write a function named is Multiple that determines for a pair of integers whether the second is a mu...
Questions
question
English, 24.09.2021 17:50
question
English, 24.09.2021 17:50