summaryrefslogtreecommitdiff
path: root/147/CH1/EX1.7
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /147/CH1/EX1.7
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '147/CH1/EX1.7')
-rw-r--r--147/CH1/EX1.7/Example1_7.sce18
-rw-r--r--147/CH1/EX1.7/Result1_7.txt4
2 files changed, 22 insertions, 0 deletions
diff --git a/147/CH1/EX1.7/Example1_7.sce b/147/CH1/EX1.7/Example1_7.sce
new file mode 100644
index 000000000..dc8176855
--- /dev/null
+++ b/147/CH1/EX1.7/Example1_7.sce
@@ -0,0 +1,18 @@
+close();
+clear;
+clc;
+//resistance 'R1', 'R2', 'R3', 'R4' connected in series
+V = 100; //V
+R1 = 5; //ohm
+R2 = 10; //ohm
+R3 = 15; //ohm
+R4 = 20; //ohm
+//Voltage across R1 'V1'
+V1 = R1*V/(R1+R2+R3+R4);
+//Voltage across R2 'V2'
+V2 = R2*V/(R1+R2+R3+R4);
+//Voltage across R3 'V3'
+V3 = R3*V/(R1+R2+R3+R4);
+//Voltage across R4 'V4'
+V4 = R4*V/(R1+R2+R3+R4);
+mprintf("\nVoltage across %d ohm resistor is %d V\nVoltage across %d ohm resistor is %d V\nVoltage across %d ohm resistor is %d V\nVoltage across %d ohm resistor is %d V",R1,V1,R2,V2,R3,V3,R4,V4); \ No newline at end of file
diff --git a/147/CH1/EX1.7/Result1_7.txt b/147/CH1/EX1.7/Result1_7.txt
new file mode 100644
index 000000000..e28a1ee3f
--- /dev/null
+++ b/147/CH1/EX1.7/Result1_7.txt
@@ -0,0 +1,4 @@
+Voltage across 5 ohm resistor is 10 V
+Voltage across 10 ohm resistor is 20 V
+Voltage across 15 ohm resistor is 30 V
+Voltage across 20 ohm resistor is 40 V \ No newline at end of file