summaryrefslogtreecommitdiff
path: root/3754/CH9/EX9.1/9_1.sce
blob: 3bffbcffe666df20f9e25e92d609396a06f02299 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
clear//

//Variables

V = 1.5                     //Source Voltage (in volts)
RS = 0.2                    //Resistance (in ohm)
RL = 1                      //Load Resistance (in ohm)

//Calculation

RT = RS + RL                //Total Resistance (in ohm)
I = V / RT                  //Current (in Ampere)
VAB = I * RL                //Voltage drop across AB (in volts)
VR = V - VAB                //Voltage drop due to internal resistance (in volts)

//Result

printf("\n Voltage drop across internal resistance is  %0.3f  volts.",VR)