Question
August 30, 2009 at 04:40 PM
jmpbama92

I need help writing a C Program

by jmpbama92 . Updated 17 years ago

In this project, you should create a program that figures out some values in a series circuit with a voltage source and two resistors. More explicitly, your program should do the following:
1. Prompt the user to enter the voltage of the source, and the values of the resistors.
2. Use those values to calculate and display the current through each circuit element, the voltage across each resistor, and the total power dissipated in the circuit.
3. The values should be displayed with two decimal places.
You can use the following equations:
Voltage across resistor 1 is: V_1=(R_1/(R_1+R_2))*V
Voltage across resistor 2 is: V_2=(R_2/(R_1+R_2))*V
Current through each element is: I=(V/(R_1_R_2))
Total power dissipated is: P=(V^2/(R_1+R_2))

This discussion is locked

All Comments