subject
Engineering, 19.12.2019 00:31 Oso29

This program reads in two numbers from the user, dividend and divisor, and prints out whether dividend is evenly divisible by divisor. for example, one run of the program may look like this: enter the dividend: 10 enter the divisor: 5 10 is divisible by 5! because 5 goes into 10 twice. 10 is evenly divisible by 5. another run may look like this: enter the dividend: 10 enter the divisor: 8 10 is not divisible by 8! because 10 / 8 is 1.25, 10 is not evenly divisible by 8. the bug: the problem is that if the user inputs 0 for the divisor, the program tries to divide by 0 and the program crashes. your job: your job is to use short circuiting to prevent the condition inside the if statement from dividing by 0. your program should be able to produce the following output: enter the dividend: 10 enter the divisor: 0 10 is not divisible by 0!

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Adouble-strand no. 60 roller chain is used to transmit power between a 13-tooth driving sprocket rotating at 300 rev/min and a 52-tooth driven sprocket. a) what is the allowable horsepower of this drive? b) estimate the center-to-center distance if the chain length is 82 pitches. c) estimate the torque and bending force on the driving shaft by the chain if the actual horsepower transmitted is 30 percent less than the corrected (allowable) power.
Answers: 3
question
Engineering, 04.07.2019 18:20
Refrigerant-134a enters the compressor of a refrigerator as superheated vapor at 0.14 mpa and -10°c at a rate of 0.05 ka/s and leaves at 0.8 mpa and 50°c. the refrigerant is cooied in the condenser to 0.72 mpa and 26'c. it is then throttled to 0.15 mpa. sketch the t-s diagram for the system and evaluate: 6) the rate of heat removai from the refrigerated space (kw), it) the power input to the compressor (kw), ii) the isentropic efficiency of the compressor (%), and iv) the cop of the refrigerator.
Answers: 2
question
Engineering, 04.07.2019 19:10
The sum of the normal stresses does not change as the stress state rotates through an angle. a)-trune b)- false
Answers: 2
question
Engineering, 04.07.2019 19:20
The process in which the system pressure remain constant is called a)-isobaric b)-isochoric c)-isolated d)-isothermal
Answers: 3
You know the right answer?
This program reads in two numbers from the user, dividend and divisor, and prints out whether divide...
Questions
question
Biology, 02.08.2019 17:00
Questions on the website: 13722361