summaryrefslogtreecommitdiff
path: root/608/CH5/EX5.04/5_04.sce
blob: 3205d6d617415c728d2e48877f57b32427ea5ab3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//Problem 5.04:Determine the value of voltage V shown in Figure 5.6.

//initializing the variables:
Vt = 50; // in volts
R1 = 4; // in ohms
R2 = 6; // in ohms

//calculation:
Rt = R1 + R2
I = Vt/Rt
V2 = I*R2

printf("\n\nResult\n\n")
printf("\n Voltage(V) %.0f Volts(V)\n",V2)