summaryrefslogtreecommitdiff
path: root/1553/CH29/EX29.8/29Ex8.sce
blob: 8a90d05fe7f78ff85c0c4ef371d6b0b51a0cf7d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//Chapter 29 Ex8
clc;
clear;
close;

facevalue=25; 
premium=5;
brokerage=1/4; 
shares=88;
rateDividend=(15/2)/100; //rate is in percentage hence divided by 100
investment=2662;

cost1share=facevalue+premium+brokerage; //cash required to purchase Rs.100 stock
costshares= cost1share*shares;
facevalueAllShares=shares*facevalue;
dividendAllShares=facevalueAllShares*rateDividend;
income=dividendAllShares;

rateInterest=(income/investment)*100;

mprintf("The rate of interest on investment is Rs.%.1f percent",rateInterest);