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.
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment