summaryrefslogtreecommitdiff
path: root/1553/CH29/EX29.3/29Ex3.sce
blob: b88c6f0432bc9d29b18eef1b53d497b1883ba654 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//Chapter 29 Ex3
clc;
clear;
close;

facevalue=100; //since the stock is calculated over 100
discount=4;
brokerage=1/4; //value is in percentage
purchaseAmt=2400;
cashfacevalue=facevalue-discount-brokerage; //cash required to purchase Rs.100 stock
cashpurchaseAmt= cashfacevalue*purchaseAmt/facevalue;
mprintf("The cash required to purchase Rs.2400 stock is Rs.%.0f",cashpurchaseAmt);