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 11:30
One subtask in the game is to roll the dice. explain why is roll the dice an abstraction.
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
If an improvement creates no significant change in a product’s performance, then it is a(n) ? a0 design improvement. (there are no answer choices)
Answers: 1
question
Computers and Technology, 24.06.2019 02:10
Consider the usual algorithm to convert an infix expression to a postfix expression. suppose that you have read 10 input characters during a conversion and that the stack now contains these symbols: (5 points) | | | + | | ( | bottom |_*_| now, suppose that you read and process the 11th symbol of the input. draw the stack for the case where the 11th symbol is
Answers: 2
question
Computers and Technology, 24.06.2019 03:00
What is one potential problem associated with an organization purchasing new technology early in its lifecycle
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
Mathematics, 09.07.2021 19:30
Questions on the website: 13722363