subject
Engineering, 15.10.2019 22:20 juliashalnev

Write a method ismultiple that determines, for a pair of integers, whether the second integer is a multiple of the first. the method should take two integer arguments and return true if the second is a multiple of the first and false otherwise. [hint: use the remainder operator .] incorporate this method into an application that inputs a series of pairs of integers (one pair at a time) and determines whether the second value in each pair is a multiple of the first. har()

prompts:

enter a second number:

enter one number:

sample outputs :

enter one number: enter a second number: 49 is a multiple of 7

do you want to enter another pair(y/n)? enter one number: enter a second number: 28 is a multiple of 7

do you want to enter another pair(y/n)? enter one number: enter a second number: 42 is a multiple of 7

do you want to enter another pair(y/n)? enter one number: enter a second number: 7 is not a multiple of 42

do you want to enter another pair(y/n)? enter one number: enter a second number: 25 is a multiple of -5

do you want to enter another pair(y/n)? enter one number: enter a second number: 12 is a multiple of -12

do you want to enter another pair(y/n)? enter one number: enter a second number: 9 is not a multiple of 56

do you want to enter another pair(y/n)?

ansver
Answers: 2

Another question on Engineering

question
Engineering, 03.07.2019 19:30
When using the ohmmeter function of a digital multimeter, the leads are placed in what position relative to the component being tested? a. parallel b. control c. series d. line
Answers: 3
question
Engineering, 04.07.2019 18:10
An air conditioning system consist of a 5 cm diameter pipe, operating at a pressure of 200 kpa. the air initially enters the pipe at 15°c with a velocity of 20 m/s and relative humidity of 80%. if the heat supply throughout the process is 960 w, determine the relative humidity and the temperature at the outlet
Answers: 3
question
Engineering, 04.07.2019 18:10
Coiled springs ought to be very strong and stiff. si3n4 is a strong, stiff material. would you select this material for a spring? explain.
Answers: 2
question
Engineering, 04.07.2019 18:10
Water in a partially filled large tank is to be supplied to the roof top, which is 8 m above the water level in the tank, through a 2.2-cm-internal-diameter pipe by maintaining a constant air pressure of 300 kpa (gage) in the tank. if the head loss in the piping is 2 m of water, determine the discharge rate of the supply of water to the roof top in liters per second.
Answers: 3
You know the right answer?
Write a method ismultiple that determines, for a pair of integers, whether the second integer is a m...
Questions
question
English, 18.10.2020 03:01
question
Mathematics, 18.10.2020 03:01
Questions on the website: 13722367