summaryrefslogtreecommitdiff
path: root/2471/CH2/EX2.2
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2471/CH2/EX2.2
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 '2471/CH2/EX2.2')
-rwxr-xr-x2471/CH2/EX2.2/Ex2_2.sce40
1 files changed, 40 insertions, 0 deletions
diff --git a/2471/CH2/EX2.2/Ex2_2.sce b/2471/CH2/EX2.2/Ex2_2.sce
new file mode 100755
index 000000000..19147c661
--- /dev/null
+++ b/2471/CH2/EX2.2/Ex2_2.sce
@@ -0,0 +1,40 @@
+clear ;
+clc;
+// Example 2.2
+printf('Example 2.2\n\n');
+printf('Page No. 45\n\n');
+
+// given
+C= 35000;// cost of boiler
+C_grant=0;// Capital grant available from goverment
+E= -(C-(C_grant*C));// Net expenditure
+Fs= 15250;// Fuel Saving
+r_i = 0.15;// interest
+r_t = 0.55;// tax
+
+a = [0 E Fs 0 E+Fs r_i*(E+Fs) 0 ]
+bal_1 = a(5)+a(6)-a(7)// Total Balance after 1st year
+
+c_all = 0.55;// capital allowance in 2nd year
+C_bal= (bal_1+0+Fs+(-(c_all*E)));// Cash Balance after 2nd year
+b = [bal_1 0 Fs -(c_all*E) C_bal r_i*C_bal r_t*(Fs+(r_i*C_bal))];
+bal_2 = b(5)+b(6)-b(7)//Total Balance after 2nd year
+
+c = [bal_2 0 Fs 0 bal_2+Fs r_i*(bal_2+Fs) r_t*(Fs+(r_i*(bal_2+Fs)))]
+bal_3= c(5)+c(6)-c(7)// Total Balance after 3rd year
+
+if(bal_2>0) then
+ disp('pay back period is of two year')
+else
+ disp('pay back period is of three year')
+end
+
+printf('Total saving at the end of second year is %3.2f Pound\n',bal_2);
+printf('Total saving at the end of third year is %3.2f Pound\n',bal_3);
+// Deviation in answer due to direct substitution
+
+
+
+
+
+