summaryrefslogtreecommitdiff
path: root/3836/CH2/EX2.8/Ex2_8.sce
diff options
context:
space:
mode:
Diffstat (limited to '3836/CH2/EX2.8/Ex2_8.sce')
-rw-r--r--3836/CH2/EX2.8/Ex2_8.sce13
1 files changed, 13 insertions, 0 deletions
diff --git a/3836/CH2/EX2.8/Ex2_8.sce b/3836/CH2/EX2.8/Ex2_8.sce
new file mode 100644
index 000000000..24da405b0
--- /dev/null
+++ b/3836/CH2/EX2.8/Ex2_8.sce
@@ -0,0 +1,13 @@
+clear
+//Initialisation
+r1=1*10**3 //resistance in ohm
+r2=500 //resistance in ohm
+v1=15 //voltage
+v2=3 //voltage
+
+//Calculation
+v=v2+((v1-v2)*((r2)*(r1+r2)**-1)) //resistance in ohm
+
+//Result
+printf("\n V = %d V",v)
+