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, 04.07.2019 18:10
Aloaded platform of total mass 500 kg is supported by a dashpot and by a set of springs of effective stiffness 72 kn/m. it is observed that when the platform is depressed through a distance x = 12.5 cm below its equilibrium position and then released without any initial velocity; it reaches its equilibrium position in the shortest possible time without overshoot. find the position and velocity of the loaded platform 0.10 sec. after its release. if a further load of 400 kg is added to the platform, find, i) the frequency of damped vibrations, and i) the amplitude of vibration after 2 complete oscillations, given that the initial amplitude is 15 cm.
Answers: 1
question
Engineering, 04.07.2019 18:10
A-mn has a cubic structure with a0 0.8931 nm and a density of 7.47 g/cm3. b-mn has a different cubic structure, with a0 0.6326 nm and a density of 7.26 g/cm3. the atomic weight of manganese is 54.938 g/mol and the atomic radius is 0.112 nm. determine the percent volume change that would occur if a-mn transforms to b-mn.
Answers: 2
question
Engineering, 04.07.2019 18:20
An engine runs on the ideal diesel cycle. the cycle has a compression ratio of 20 and a cutoff ratio of 2. the highest temperature in the cycle is 1200 k. if the heat into the system is 300 kj/kg of working fluid and using variable specific heats determine the work produced per mass of working fluid
Answers: 3
question
Engineering, 04.07.2019 19:10
An engine, weighing 3000 n, is supported on a pedestal mount. it has been observed that the engine induces vibration into the surrounding area through its pedestal at the maximum operating speed. determine the stiffness of the dynamic vibration absorber spring in (n/m) that will reduce the vibration when mounted on the pedestal. the magnitude of the exciting force is 250 n, and the amplitude of motion of the auxiliary mass is to be limited to 2 mm note: in this question type-in right numbers, no decimals, no fractions, no unit. approximate to right number if needed
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
Mathematics, 30.05.2020 23:02
Questions on the website: 13722367