summaryrefslogtreecommitdiff
path: root/2471/CH3
diff options
context:
space:
mode:
Diffstat (limited to '2471/CH3')
-rwxr-xr-x2471/CH3/EX3.1/Ex3_1.sce15
-rwxr-xr-x2471/CH3/EX3.10/Ex3_10.sce28
-rwxr-xr-x2471/CH3/EX3.11/Ex3_11.sce29
-rwxr-xr-x2471/CH3/EX3.12/Ex3_12.sce25
-rwxr-xr-x2471/CH3/EX3.13/Ex3_13.sce25
-rwxr-xr-x2471/CH3/EX3.14/Ex3_14.sce53
-rwxr-xr-x2471/CH3/EX3.15/Ex3_15.sce35
-rwxr-xr-x2471/CH3/EX3.16/Ex3_16.sce26
-rwxr-xr-x2471/CH3/EX3.17/Ex3_17.sce43
-rwxr-xr-x2471/CH3/EX3.2/Ex3_2.sce12
-rwxr-xr-x2471/CH3/EX3.3/Ex3_3.sce13
-rwxr-xr-x2471/CH3/EX3.4/Ex3_4.sce19
-rwxr-xr-x2471/CH3/EX3.5/Ex3_5.sce33
-rwxr-xr-x2471/CH3/EX3.6/Ex3_6.sce30
-rwxr-xr-x2471/CH3/EX3.7/Ex3_7.sce19
-rwxr-xr-x2471/CH3/EX3.8/Ex3_8.sce23
-rwxr-xr-x2471/CH3/EX3.9/Ex3_9.sce31
17 files changed, 459 insertions, 0 deletions
diff --git a/2471/CH3/EX3.1/Ex3_1.sce b/2471/CH3/EX3.1/Ex3_1.sce
new file mode 100755
index 000000000..84cf04b8c
--- /dev/null
+++ b/2471/CH3/EX3.1/Ex3_1.sce
@@ -0,0 +1,15 @@
+clear ;
+clc;
+// Example 3.1
+printf('Example 3.1\n\n');
+printf('Page No. 58\n\n');
+
+// given
+P = 10000;// Principal Amount
+i = 0.15;// Interest Rate
+n = 4;//years
+I = P*i*n;// Simple Interest
+Ts= P+I;// The total repayment
+printf('The total repayment is %.0f Euro\n',Ts)
+
+
diff --git a/2471/CH3/EX3.10/Ex3_10.sce b/2471/CH3/EX3.10/Ex3_10.sce
new file mode 100755
index 000000000..24dab07ee
--- /dev/null
+++ b/2471/CH3/EX3.10/Ex3_10.sce
@@ -0,0 +1,28 @@
+clear ;
+clc;
+// Example 3.10
+printf('Example 3.10\n\n');
+printf('Page No. 71\n\n');
+
+// given
+C = 2500;// Cost of the project
+P = 1000;// Cash in flow
+r_r = 0.12;// Rate of return
+S = 0;// Zero salvage value
+n = 4;//years
+
+for j= 1:1:4 // as for four years
+ d_(j) = P*(1/(1+r_r)^j);
+ end
+
+
+P_v = d_(1)+d_(2)+d_(3)+d_(4);//Present value of cash inflow
+N = P_v-C;
+printf('Net present value is %.0f Pound\n',ceil(N))
+
+if(P_v>C) then
+ disp('The project may be undertaken')
+else
+ disp('The project may not be undertaken')
+ end
+
diff --git a/2471/CH3/EX3.11/Ex3_11.sce b/2471/CH3/EX3.11/Ex3_11.sce
new file mode 100755
index 000000000..a37c4ca3a
--- /dev/null
+++ b/2471/CH3/EX3.11/Ex3_11.sce
@@ -0,0 +1,29 @@
+clear ;
+clc;
+// Example 3.11
+printf('Example 3.11\n\n');
+printf('Page No. 72\n\n');
+
+// given
+Cash_out = 80000;// Present value of cash outflow for both projects E and F
+r_r = .2;// Rate of return
+n = 5;// years
+
+d = [0.833 0.694 0.579 0.482 0.402]// Discount Factor for 20% of rate of return for 5 years
+Ce = [10000 20000 30000 40000 50000]// Cash flow for project E in Pound
+Pe = [8330 13880 17370 19280 20100]// Present value for project E in Pound
+
+Cf = [50000 40000 30000 20000 10000]// Cash flow for project F in Pound
+Pf = [41650 27760 17370 9640 4020]// Present value for project F in Pound
+
+Cash_inE = sum(Pe)//Present value of cash inflow in Pound
+Cash_inF = sum(Pf)//Present value of cash inflow in Pound
+
+Net_E = Cash_inE - Cash_out;// net present value for project E in Pound
+Net_F = Cash_inF - Cash_out;// net present value for project F in Pound
+
+if (Net_E>Net_F) then
+ disp('Project E is selected based on NPV')
+else
+ disp('Project F is selected based on NPV')
+end
diff --git a/2471/CH3/EX3.12/Ex3_12.sce b/2471/CH3/EX3.12/Ex3_12.sce
new file mode 100755
index 000000000..573b3b043
--- /dev/null
+++ b/2471/CH3/EX3.12/Ex3_12.sce
@@ -0,0 +1,25 @@
+clear ;
+clc;
+// Example 3.12
+printf('Example 3.12\n\n');
+printf('Page No. 72\n\n');
+
+// given
+Cash_inG = 43000;// Present value of cash inflow for project G in Pound
+Cash_outG = 40000;// Present value of cash outflow for project G in Pound
+Net_G = Cash_inG - Cash_outG;// Net present value for G in Pound
+PI_G = (Cash_inG/Cash_outG);// Profitability index for G
+
+Cash_inH = 23000;// Present value of cash inflow for project H in Pound
+Cash_outH = 20000;// Present value of cash outflow for project H in Pound
+Net_H = Cash_inH - Cash_outH;// Net present value for H in Pound
+PI_H = (Cash_inH/Cash_outH);// Profitability index for H
+
+//The higher the profitability index the more desirable is the project.
+if (PI_G>PI_H) then
+ disp('Project G is more attractive than Project H')
+else
+ disp('Project H is more attractive than Project G')
+end
+
+
diff --git a/2471/CH3/EX3.13/Ex3_13.sce b/2471/CH3/EX3.13/Ex3_13.sce
new file mode 100755
index 000000000..790a63c33
--- /dev/null
+++ b/2471/CH3/EX3.13/Ex3_13.sce
@@ -0,0 +1,25 @@
+clear ;
+clc;
+// Example 3.13
+printf('Example 3.13\n\n');
+printf('Page No. 73\n\n');
+
+// given
+Cash_out = 80000;// Present value of cash outflow for project F in Pound
+n = 5;// years
+Cash_in= [50000 40000 30000 20000 10000]// Cashn in \flow for project F in Pound
+NPV = 0;//At the end of 5 years
+
+//Let the unknown rate for project F be rm.
+
+//The amount standing at the end of 5 years is\n => 0 = 80000*(1+rm)^5 - 50000*(1+rm)^4 - 40000*(1+rm)^3 - 30000*(1+rm)^2 - 20000*(1+rm)^1 - 10000
+// By taking (1+rm) = x\n =>8*x^5 - 5*x^4 - 4*x^3 - 3*x^2 - 2*x - 1 = 0\n\n')
+
+function y=fsol1(x)
+ y= 8*x^5 - 5*x^4 - 4*x^3 - 3*x^2 - 2*x - 1;
+endfunction
+[xres]=fsolve(100,fsol1);
+xres
+rm = (xres - 1)*100;
+printf('The value of rm for project F is %3.0f per cent\n',ceil(rm))
+
diff --git a/2471/CH3/EX3.14/Ex3_14.sce b/2471/CH3/EX3.14/Ex3_14.sce
new file mode 100755
index 000000000..84b34e6bd
--- /dev/null
+++ b/2471/CH3/EX3.14/Ex3_14.sce
@@ -0,0 +1,53 @@
+clear ;
+clc;
+// Example 3.14
+printf('Example 3.14\n\n');
+printf('Page No. 74\n\n');
+
+// given
+n = 5;//years
+C = 80000;// Cost of the project in Pound
+Cash_in = [10000 20000 30000 40000 50000]// Cash inflow in Pound
+r_d1 = 15;// Discount factor of 15%
+r_d2 = 18 ;// Discount factor of 18%
+r_d3 = 20;// Discount factor of 20%
+
+//At discount of 15%
+df_1 = [0.870 0.756 0.658 0.572 0.497]// Discount factor for every year
+PV_1 = [8700 15120 19740 22880 24850]// Present value
+Net_1 = sum (PV_1);// net present value
+
+
+//At discount of 18%
+df_2 = [0.847 0.718 0.609 0.516 0.437]// Discount factor for every year
+PV_2 = [8470 14360 18270 20640 21850]// Present value
+Net_2 = sum (PV_2);// net present value
+
+
+//At discount of 20%
+df_3 = [0.833 0.694 0.579 0.482 0.402]// Discount factor for every year
+PV_3 = [8330 13880 17370 19280 20100]// Present value
+Net_3 = sum (PV_3);// net present value
+
+// f = N.P.V. cash inflow - N.P.V. cash outflow
+//(1) By Numerical Method
+ff = 2*((sum (PV_2) - C)/(sum (PV_2) - sum(PV_3)));// in percentage
+f = 18 + ff;
+printf('the internal rate of return in percentage is %3.2f \n\n',f)// Deviation in answer due to direct substitution
+
+//(2) By Graphical Interpolation
+f_1 = (sum (PV_1) - C)/10^3;//At discount factor of 15%
+f_2 = (sum (PV_2) - C)/10^3;//At discount factor of 18%
+f_3 = (sum (PV_3) - C)/10^3;//At discount factor of 20%
+
+x = [f_1 f_2 f_3];
+y = [r_d1 r_d2 r_d3];
+plot(x,y,'r*');
+
+plot2d (x,y);// please see the corresponding graph in graphic window
+xtitle('Discount factor against f','f ( *10^3 Pound)','Discount factor(%)')
+regress(x,y)
+coefs = regress(x,y);
+printf('the internal rate of return in percentage is %3.1f \n',coefs(1))// Deviation in answer due to direct substitution
+
+
diff --git a/2471/CH3/EX3.15/Ex3_15.sce b/2471/CH3/EX3.15/Ex3_15.sce
new file mode 100755
index 000000000..b1aeb453e
--- /dev/null
+++ b/2471/CH3/EX3.15/Ex3_15.sce
@@ -0,0 +1,35 @@
+clear ;
+clc;
+// Example 3.15
+printf('Example 3.15\n\n');
+printf('Page No. 77\n\n');
+
+// given
+i_t = [20 40 60 80 100];// Insulation thickness in mm
+f_c = [2.2 3.5 4.8 6.1 7.4];// Fixed costs in (10^3 Pound / year)
+h_c = [10.2 6.5 5.2 4.6 4.2];// Heat costs in (10^3 Pound / year)
+t_c = [12.4 10 10 10.7 11.6];// Total costs in (10^3 Pound / year)
+
+//(a) Graphical solution
+//Refer figure 3.8
+C_T = 9750;// Minimum total cost in Pound
+t = 47;// Corresponding thickness of insulation in mm
+printf('The most economic thickness of insulation is %.0f mm \n',t)
+
+//(b) Numerical solution
+// The cost due to heat losses,C1, and the fixed costs,C2, vary according to the equations;-
+// C1 = (a/x) + b and C2 = (c*x) + d
+// Substituting the values of C1 and C2 together with the corresponding insulation thickness values , the following equations are obtained :-
+// C1 = (150*10^3/x) + 2.7*10^3 and C2 = (65*x) + 0.9*10^3
+//And to obtain the total costs
+//CT = C1 + C2 = (150*10^3/x) + (65*x) + 3.6*10^3
+// Differentiate to optimise, and put dCT/dx equal to zero
+//dCT/dx =-((150*10^3)/x^2) + 65 = 0
+
+//Let y = dCT/dx
+function y=fsol1(x)
+ y = -((150*10^3)/x^2) + 65;
+endfunction
+[xres]=fsolve(50,fsol1);
+x = xres;
+printf('The optimum thickness of insulation is %.0f mm \n',x)
diff --git a/2471/CH3/EX3.16/Ex3_16.sce b/2471/CH3/EX3.16/Ex3_16.sce
new file mode 100755
index 000000000..e01e8d867
--- /dev/null
+++ b/2471/CH3/EX3.16/Ex3_16.sce
@@ -0,0 +1,26 @@
+clear ;
+clc;
+// Example 3.16
+printf('Example 3.16\n\n');
+printf('Page No. 79\n\n');
+
+// given
+tb = [36*10^3 72*10^3 144*10^3 216*10^3]; //operating time in s
+U = [971 863 727 636];// Mean overall heat transfer rate in W/m^2-K
+A = 50;// area in m^2
+dT = 25;// temperature difference in degree celcius
+ts = 54*10^3;// Time in sec (h converted to sec)
+//As Q = U*A*dT
+for i = [1:1:4]
+ Q(i) = (U(i)*A*dT)/10^6;
+ Q_a(i) = ((tb(i)*Q(i)*10^6)/(tb(i) + ts))/10^6;
+ printf('the average heat transfer rate is %.3f *10^6 W \n',Q_a(i))
+end
+
+//Refer figure 3.9
+printf('\n')
+Q_max = 0.67*10^6;// Maximum value of Q in W
+T_opt = 33;// Time in h
+printf('The maximum value of Q obtained is %3.2e W \n',Q_max)
+printf('The most econnomic opertaing time for the heat exchanger to run is %.0f h ',T_opt)
+
diff --git a/2471/CH3/EX3.17/Ex3_17.sce b/2471/CH3/EX3.17/Ex3_17.sce
new file mode 100755
index 000000000..bd38ed106
--- /dev/null
+++ b/2471/CH3/EX3.17/Ex3_17.sce
@@ -0,0 +1,43 @@
+clear ;
+clc;
+// Example 3.17
+printf('Example 3.17\n\n');
+printf('Page No. 80\n\n');
+
+// given
+// C_T = 7*x + (40000/(x*y)) + 6*y + 10
+//Differentiating C_T with respect to x and y:-
+//dC_T/dx = 7 - (40000/(x^2*y))
+//dC_T/dy = - (40000/(x*y^2)) + 6
+
+//For optimum conditions :- dC_T/dx = dC_T/dy = 0
+//dC_T/dx = 0 => 7 - (40000/(x^2*y)) = 0
+//=> y = 40000/(7*x^2).......(1)
+//dC_T/dy = 0 =>- (40000/(y^2*x)) +6 = 0
+//=> y = (40000/(6*x))^0.5.......(2)
+
+//From equation (1) and (2)
+//=> 40000/(7*x^2) - (40000/(6*x))^0.5 = 0
+
+function y=fsol1(x)
+ y = 40000/(7*x^2) - (40000/(6*x))^0.5 ;
+endfunction
+[xres]=fsolve(20,fsol1);
+x = xres;
+
+//from equation (1)
+y = 40000/(7*x^2);
+
+//a = d^2C_T/dx^2 = 80000/(x^3*y)
+//b = d^2C_T/dy^2 = 80000/(x*y^3)
+a = 80000/(x^3*y);
+b = 80000/(x*y^3);
+if a > 0
+ if b > 0
+//The optimum conditions must occur at a point of minimum cost- C_T_m
+C_T_m = 7*x + (40000/(x*y)) + 6*y + 10;// in Pound
+printf('The minimum cost is %.1f Pound',C_T_m)
+ end
+end
+
+
diff --git a/2471/CH3/EX3.2/Ex3_2.sce b/2471/CH3/EX3.2/Ex3_2.sce
new file mode 100755
index 000000000..490faae4f
--- /dev/null
+++ b/2471/CH3/EX3.2/Ex3_2.sce
@@ -0,0 +1,12 @@
+clear ;
+clc;
+// Example 3.2
+printf('Example 3.2\n\n');
+printf('Page No. 58\n\n');
+
+// given
+P = 10000;// Principal Amount in Pound
+i = 0.15;// Interest Rate
+n = 4;//years
+Tc = P*(1+i)^n;
+printf('The total repayment after adding compond interest is %.0f Pound\n',Tc)
diff --git a/2471/CH3/EX3.3/Ex3_3.sce b/2471/CH3/EX3.3/Ex3_3.sce
new file mode 100755
index 000000000..48c81812a
--- /dev/null
+++ b/2471/CH3/EX3.3/Ex3_3.sce
@@ -0,0 +1,13 @@
+clear ;
+clc;
+// Example 3.3
+printf('Example 3.3\n\n');
+//Page No. 59
+
+// given
+P = 60000;/// Principal Amount in Pound
+i = 0.18;// Interest Rate
+n = 10;//years
+R = P*((i*(1+i)^n)/((1+i)^n -1));//Rate of Capital Recovery
+printf('The annual investment required is %.1f Pound\n',R)
+
diff --git a/2471/CH3/EX3.4/Ex3_4.sce b/2471/CH3/EX3.4/Ex3_4.sce
new file mode 100755
index 000000000..81fb992bb
--- /dev/null
+++ b/2471/CH3/EX3.4/Ex3_4.sce
@@ -0,0 +1,19 @@
+clear ;
+clc;
+// Example 3.4
+printf('Example 3.4\n\n');
+printf('Page No. 61\n\n');
+
+// given
+P = 100000;/// Principal Amount of boiler plant in Pound
+n = 10;// service life in years
+S = 0;//Zero Salvage value
+nT = (n*(n+1)/2);//sum of years
+for i = 0:9
+ d_(i+1) = ((P-S)/nT)*(n-i);
+end
+printf('The Annual depreciation for first year is %.0f Pound\n',d_(1))
+printf('The Annual depreciation for second year is %.0f Pound\n\n',d_(2))
+printf('The Annual depreciation for third year is %.0f Pound\n',d_(3))
+printf('The Annual depreciation for ten year is %.0f Pound\n',d_(10))
+// Deviation in answer due to some .approximation of values in the book
diff --git a/2471/CH3/EX3.5/Ex3_5.sce b/2471/CH3/EX3.5/Ex3_5.sce
new file mode 100755
index 000000000..d1a2435d9
--- /dev/null
+++ b/2471/CH3/EX3.5/Ex3_5.sce
@@ -0,0 +1,33 @@
+clear ;
+clc;
+// Example 3.5
+printf('Example 3.5\n\n');
+printf('Page No. 62\n\n');
+
+// given
+P = 40000;/// Principal Amount of boiler plant in Pound
+nT = 10;// service life in years
+S = 4000;// Salvage value
+n = 6;// years after which Asset value has to be calculated
+
+//(a) Straight line method
+d = ((P-S)/nT);// Depreciation
+Aa = (d*(nT-n)) + S;
+printf('The Asset value at the end of six years using Straight line method is %.0f Pound\n',Aa)
+
+// (b) Declining balance technique
+f = 1-(S/P)^(1/nT);// Fixed fraction of the residual asset
+Ab = P*(1-f)^n;
+printf('The Asset value at the end of six years using Declining balance technique is %.0f Pound\n\n',Ab)
+
+// (c) Sum of the years digit
+sum_nT = (nT*(nT+1)/2);//sum of 10 years
+sum_n = 45;//sum after 6 years
+dc = ((sum_n/sum_nT)*(P-S));// Depreciation after 6 years
+Ac = P-dc;
+printf('The Asset value at the end of six years using Sum of the years digit is %.0f Pound\n',Ac)// Deviation in answer due to direct substitution
+
+//(d) Sinking Fund Method
+r_i = 0.06;// Rate of interest
+Ad = P-((P-S)*(((1+r_i)^n-1)/((1+r_i)^nT-1)));
+printf('The Asset value at the end of six years using Sinking Fund Method is %.0f Pound\n',Ad)// Deviation in answer due to direct substitution
diff --git a/2471/CH3/EX3.6/Ex3_6.sce b/2471/CH3/EX3.6/Ex3_6.sce
new file mode 100755
index 000000000..dfd29dc94
--- /dev/null
+++ b/2471/CH3/EX3.6/Ex3_6.sce
@@ -0,0 +1,30 @@
+clear ;
+clc;
+// Example 3.6
+printf('Example 3.6\n\n');
+printf('Page No. 67\n\n');
+
+// given
+P = 9000;// Capital Cost in Pound
+n = 5;// Project lifetime
+Less_dep = 8000;// Less Depreciation
+
+//For Project A
+d1 = [4500 3750 3000 1500 750 ]// Saving in every year (before depreciation)
+dT1 = sum (d1)
+Net_S1 = dT1- Less_dep;// Total Net Saving
+Avg1 = Net_S1/n;// Average net annual saving
+R_R1 = (Avg1/P)*100;
+
+//For Project
+d2 = [750 2250 4500 4500 1500 ]// Saving in every year (before depreciation)
+dT2 = sum (d2)
+Net_S2 = dT2- Less_dep;// Total Net Saving
+Avg2 = Net_S2/n;// Average net annual saving
+R_R2 = (Avg2/P)*100;
+
+printf('The percentage of Rate of Return on original investment for Project A is %3.1f \n',R_R1)
+printf('The percentage of Rate of Return on original investment for Project B is %3.1f \n',R_R2)
+
+
+
diff --git a/2471/CH3/EX3.7/Ex3_7.sce b/2471/CH3/EX3.7/Ex3_7.sce
new file mode 100755
index 000000000..54df1588e
--- /dev/null
+++ b/2471/CH3/EX3.7/Ex3_7.sce
@@ -0,0 +1,19 @@
+clear ;
+clc;
+// Example 3.7
+printf('Example 3.7\n\n');
+printf('Page No. 68\n\n');
+
+// given
+Pc = 10000;// Capital cost for project C in Pound
+Pd = 10000;// Capital cost for project d in Pound
+nc = 3;// pay back period for C
+nd = 3;// pay back period for D
+Ca = [4500 3500 2000 2000 1000];// Annual Cash flow for C in Pound
+Cc = [4500 8000 10000 12000 13000]// Cumulative Cash flow for C in Pound
+Da = [1500 4000 4500 2200 1800 1000];// Annual Cash flow for D in Pound
+Dc = [1500 5500 10000 12200 14000 15000]// Cumulative Cash flow for D in Pound
+Ac = Cc(5)-Pc;// in Pound
+Ad = Dc(6)-Pd;// in Pound
+printf('Additional amount from C after the pay back time is %3.f Pound\n',Ac)
+printf('Additional amount from D after the pay back time is %3.f Pound\n',Ad)
diff --git a/2471/CH3/EX3.8/Ex3_8.sce b/2471/CH3/EX3.8/Ex3_8.sce
new file mode 100755
index 000000000..11ae55f77
--- /dev/null
+++ b/2471/CH3/EX3.8/Ex3_8.sce
@@ -0,0 +1,23 @@
+clear ;
+clc;
+// Example 3.8
+printf('Example 3.8\n\n');
+printf('Page No. 69\n\n');
+
+//Refer figure 3.6
+// given
+n = 5;//years
+C = 80000;// COst of the project in Pound
+S = 0;// Zero Salvage Value
+A_E = [10000 20000 30000 40000 50000]// Annual Net cash flow for project E in Pound
+C_E = [10000 30000 60000 100000 150000]// Cummulative Net cash flow for project E in Pound
+A_F = [50000 40000 30000 20000 10000]// Annual Net cash flow for project F in Pound
+C_F = [50000 90000 120000 140000 150000]// Cummulative Net cash flow for project F in Pound
+
+//From the figure 3.6 (intercept of x-axis)
+P_F = 1.75;// in years
+P_E = 3.5;// in years
+printf('The pay-back time of project F is %.2f \n',P_F)
+printf('The pay-back time of project E is %.1f \n\n',P_E)
+
+printf('As the pay-back time is less for project F,\nProject F would always be choosen in practice\nsince prediction of savings in the early years are more reliable than long-term predictions.')
diff --git a/2471/CH3/EX3.9/Ex3_9.sce b/2471/CH3/EX3.9/Ex3_9.sce
new file mode 100755
index 000000000..f39ecdb5c
--- /dev/null
+++ b/2471/CH3/EX3.9/Ex3_9.sce
@@ -0,0 +1,31 @@
+clear ;
+clc;
+// Example 3.9
+printf('Example 3.9\n\n');
+printf('Page No. 70\n\n');
+
+// given
+P = 1;/// Principal Amount in Pound
+
+r_i = 0.1;// Compound interest rate
+for i = [1:1:4]
+ c = P*(1+r_i)^i;
+ printf('compound intrest after year %.0f is equal to %.2f Pound\n',i,c)
+end
+
+new_P = 1000*P;//in Pound
+new_c = 1000*c;// in Pound
+printf('The new amount at the compound interest after fourth year is %.0f Pound\n\n',new_c)
+
+// Discount rate
+r_d = 0.10;// Discount rate
+for j= 1:1:4
+ d = P*(1/(1+r_d)^j);
+ printf('The amount receivable at discount in year %.0f is %.3f Pound\n',j,d)
+end
+
+new_P1 = new_c;// in Pound
+new_d = new_P1*d;// in Pound
+printf('The new amount receivable at discount in fourth year is %.0f Pound\n',new_d)
+
+