Computers and Technology
Computers and Technology, 27.07.2021 15:40, ramoj0569

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 );
}

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 10:00, serenityharmon1
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
image
Computers and Technology, 23.06.2019 10:50, whyidkmyself
Your friend kayla is starting her own business and asks you whether she should set it up as a p2p network or as a client-server network. list three questions you might ask to kayla decide which network to use and how her answers to those questions would affect your recommendation.
Answers: 2
image
Computers and Technology, 23.06.2019 14:30, soapai
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
image
Computers and Technology, 23.06.2019 17:00, quanharris2k19
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the
Answers: 1
Do you know the correct answer?
Write a function named is Multiple that determines for a pair of integers whether the second is a mu...

Questions in other subjects:

Konu
Mathematics, 19.07.2019 15:30