Question: Write a program to illustrate the Ohms Law, I=V/R. The program will first request to input an initial voltage (in volt), a fixed resistance (in

Write a program to illustrate the Ohms Law, I=V/R. The program will first request to input an initial voltage (in volt), a fixed resistance (in ohm) and an incremental interval for voltage. A function should be written which will return the value of current (in amp) given a voltage and a resistance. Then the program will call the function and print out a table that shows the value of current under each increment of voltage. The maximum voltage is set to 50 volts. a) Main should handle all input and output.(This requires that variables in main are updated by the function.)

b) Secondary function should handle all calculations.

c) Set precision to 2. Output Example: Enter the initial voltage (in volt): 40

Enter the resistance (in ohm): 10

Enter the voltage incremental interval (in volt): 2

Voltage (volt) Resistance (ohm) Current (amp)

------------- ---------------- -------------

40 10 4.00

42 10 4.20

44 10 4.40

46 10 4.60

48 10 4.80

50 10 5.00

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!