this is one of the solutions i found to the problem in most blogs but why 120 and not 12% of 6000 which is 720

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 year=0,inv,altn;

while(altn>inv)
{
year++;
altn=120*year; // 12%of 1000 = 120
inv=(1000*year)-4000;

}

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


}

2000 + 1000 * t > 6000 + t * ( 12 % of 6000)
=> 2000 + 1000 * t > 6000 + t * ( 720 )
=> 280 * t > 4000
=> t > 100/7
=> t = 15 ( smallest such integer ).

//