Answer to Question #35344 in Assembler for jeff

Question #35344
Ohm's law relates the resistance of a electrical device (like a heater) to the electric current flowing through the device and the voltage applied to it. The law is:
I = V/R
Here, V is the voltage (measured in volts), I is the current (measured in amps), and R is the resistance (measured in ohms.) Write a program that asks the user for the voltage and the resistance of a device. The program will then write out the current flowing through it. Use floating point math.
Since V and R are integers (converted from user input) you must use a trick to do floating point division. Change the equation to this:
I = (V + 0.0)/R
The math inside parentheses is done first. So V + 0.0 is done first, and since 0.0 is floating point, so will be the result.
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS