This code calculates voltage on any resistor for the above circuit model.
Order of the resistors is like in the diagram.
Program first asks you to voltage value which in V as default. Then asks for the first resistor's value in Ohm. To end the process enter 0 as resistor value.