C languageC SolutionChapter 4Programming

Q14 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 value of Rs. 2000 when it condemned. If 9 percent per annum can be earned on alternate investments, write a program to determine what will be the minimum life of the machine to make it a more attractive investment compared to alternative investment?

Program: 107

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 value of Rs. 2000 when it condemned. If 9 percent per annum can be earned on alternate investments, write a c program to determine what will be the minimum life of the machine to make it a more attractive investment compared to alternative investment?

Output:

The Life of Machine: 5 years

Lokesh Kumar

Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.

3 thoughts on “Q14 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 value of Rs. 2000 when it condemned. If 9 percent per annum can be earned on alternate investments, write a program to determine what will be the minimum life of the machine to make it a more attractive investment compared to alternative investment?

  • Pirate

    this code doesn’t work bro.

    Reply
  • The reason the code doesn’t always work is because the alternate and invest variables are set randomly, so the loop won’t always start unless you set alternate as greater than invest before the loop.

    Reply
  • wrong code : initiation of loop is invalid
    We should use do-while loop here.

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.