diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /608/CH2/EX2.12/2_12.sce | |
download | Scilab-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/CH2/EX2.12/2_12.sce')
-rwxr-xr-x | 608/CH2/EX2.12/2_12.sce | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/608/CH2/EX2.12/2_12.sce b/608/CH2/EX2.12/2_12.sce new file mode 100755 index 000000000..cdd3a7a43 --- /dev/null +++ b/608/CH2/EX2.12/2_12.sce @@ -0,0 +1,15 @@ +//Problem 2.12: The current/voltage relationship for two resistors A and B is as shown in Figure 2.5. Determine the value of the resistance of each resistor.
+
+//initializing the variables:
+I1 = 0.020; // in ampere
+V1 = 20; // in Volts
+I2 = 0.005; // in ampere
+V2 = 16; // in Volts
+
+//calculation:
+R1 = V1/I1
+R2 = V2/I2
+
+printf("\n\nResult\n\n")
+printf("\nResistance(R1): %.0f Ohms",R1)
+printf("\nResistance(R2): %.0f Ohms\n",R2)
\ No newline at end of file |