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
Afluid flows with a velocity field given by v=(x/t)i.. determine the local and convective accelerations when x=3 and t=1.
Answers: 2
question
Engineering, 04.07.2019 18:10
Afull journal bearing has a journal diameter of 27 mm, with a unilateral tolerance of -0.028 mm. the bushing bore has a diameter of 27.028 mm and a unilateral tolerance of 0.04 mm. the l/d ratio is 0.5. the load is 1.3 kn and the journal runs at 1200 rev/min. if the average viscosity is 50 mpa-s, find the minimum film thickness, the power loss, and the side flow for the minimum clearance assembly.
Answers: 1
question
Engineering, 04.07.2019 18:20
Air flows over a heated plate àt a velocity of 50m/s. the local skin factor coefficient at a point on a plate is 0.004. estimate the local heat transfer coefficient at this point.the following property data for air are given: density = 0.88kg/m3 , viscosity 2.286 x 10 ^-5 kgm/s , k = 0.035w/mk ,cp = 1.001kj/kgk. use colburn reynolds analogy.
Answers: 1
question
Engineering, 04.07.2019 19:10
The proportional limit is always greater than the yield strength for a material. a)-trune b)- false
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
Mathematics, 07.10.2019 05:30
question
Computers and Technology, 07.10.2019 05:30
question
Biology, 07.10.2019 05:30
question
Mathematics, 07.10.2019 05:30
Questions on the website: 13722359