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?

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?

#include<stdio.h>
#include<conio.h>
int main()
{
    int year=0, invest, alternate;

    while(alternate>invest)
    {
        year++;  //year = year + 1;

        // yearly produce income form alternate solution
        // 9 % of 1000 = 90
        alternate = year * 90;

        // yearly produced income from machine
        // 1000 per year - [6000(machine cost) - 2000(salvage or scrap value of machine)]
        // 1000 * year - [6000-2000]
         invest = (1000*year) - 4000;

    }

    printf("The Life of Machine: %d years", year);

}

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.

View Comments (3)

Related Post
Leave a Comment

This website uses cookies.