summaryrefslogtreecommitdiff
path: root/608/CH5/EX5.01
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /608/CH5/EX5.01
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '608/CH5/EX5.01')
-rwxr-xr-x608/CH5/EX5.01/5_01.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/608/CH5/EX5.01/5_01.sce b/608/CH5/EX5.01/5_01.sce
new file mode 100755
index 000000000..6caaf286c
--- /dev/null
+++ b/608/CH5/EX5.01/5_01.sce
@@ -0,0 +1,21 @@
+//Problem 5.01: For the circuit shown in Figure 5.2, determine (a) the battery voltage V, (b) the total resistance of the circuit, and (c) the values of resistance of resistors R1, R2 and R3, given that the p.d.’s across R1, R2 and R3 are 5 V, 2 V and 6 V respectively.
+
+//initializing the variables:
+V1 = 5; // in volts
+V2 = 2; // in volts
+V3 = 6; // in volts
+I = 4; // in Amperes
+
+//calculation:
+Vt = V1 + V2 + V3
+Rt = Vt/I
+R1 = V1/I
+R2 = V2/I
+R3 = V3/I
+
+printf("\n\nResult\n\n")
+printf("\n (a) Total Voltage %.0f Volts(V)",Vt)
+printf("\n (b)Total Resistance %.2f Ohms",Rt)
+printf("\n (c)Resistance(R1) %.2f Ohms",R1)
+printf("\n (c)Resistance(R2) %.1f Ohms",R2)
+printf("\n (c)Resistance(R3) %.1f Ohms",R3) \ No newline at end of file