Saturday, January 30, 2010

CHAP 3[E]k Finding optimum life of machine

A machine is purchased which will produce earning of Rs. 1000 per year while it lasts. The machine costs Rs. 6000 and will have a salvage of Rs. 2000 when it is condemned. If 12 percent per annum can be earned on alternate investments what would be the minimum life of the machine to make it a more attractive investment compared to alternative investment?

void main()
{
int y=0,pm,pa;

while(pa>pm)
{
y+=1;
pa=120*y;
pm=(1000*y)-4000;

}

printf("The minimum year is %d",y);
}

2 comments: