blob: 383534475414f7a5966b4118ecdd684796f17f7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
clc
// given data
i=10/100.0 // rate
Acost=90000 // cost of A in Rs
Bcost=75000 // cost of B in Rs
Acashfl=26000 // annual cash flow of A in Rs
Bcashfl=26000 // annual cash flow of B in Rs
nA=5 // useful life of A in years
nB=4 // useful life of B in years
NPVA=Acashfl*(((1+i)**nA) - 1)/(i*(1+i)**nA) - Acost // NPV for A
NPVB=Bcashfl*(((1+i)**nB) - 1)/(i*(1+i)**nB)- Bcost // NPV for B
printf( "\nThe NPV for A is Rs %.0f",NPVA)
printf( "\nThe NPV for B is Rs %.0f",NPVB)
AEA=i*NPVA/(1-(1+i)**(-nA))
AEB=i*NPVB/(1-(1+i)**(-nB))
printf( "\nThe AE for A is Rs %.0f",AEA)
printf( "\nThe AE for B is Rs %.0f",AEB)
printf( "\nThe machine B will have higher profitability")
|