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 12:10
On a average work day more than work place firs are reorted
Answers: 1
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
Agas is compressed from vi 0.3 m, p 1 bar to of v2 0.1 m3, p2--3 bar. pressure and volume are related linearly during the process. for the gas, find the work, in kj.
Answers: 2
question
Engineering, 04.07.2019 19:20
Apiping systems consists of 6 m of 6-std type k and 12 m of 4-std type k, both drawn copper tubing. the system conveys ethylene glycol at a rate of 0.013 m3/s. the pressure drop across the system is to be calculated. there are two 90° elbows in the 6-in pipe, a reduction from the 6-in pipe to the 4-in pipe and four 90° elbows in the 4-in pipe. all fittings are soldered (same as flanged) and regular. the inlet and outlet of the system are at the same height.
Answers: 1
You know the right answer?
This program reads in two numbers from the user, dividend and divisor, and prints out whether divide...
Questions
Questions on the website: 13722360