From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 1529/CH2/EX2.9/2_09.sce | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 1529/CH2/EX2.9/2_09.sce (limited to '1529/CH2/EX2.9/2_09.sce') diff --git a/1529/CH2/EX2.9/2_09.sce b/1529/CH2/EX2.9/2_09.sce new file mode 100755 index 000000000..b83b012c8 --- /dev/null +++ b/1529/CH2/EX2.9/2_09.sce @@ -0,0 +1,8 @@ +//Chapter 2, Problem 9 +clc; +P=100; //power in watt +V=250; //voltage +I=P/V; //calculating current +R=V/I; //calculating resistance using Ohms law +printf("(a) Current = %f A\n\n\n",I); +printf("(b) Resistance = %d ohms",R); -- cgit