Skip to main content

Posts

Showing posts from December, 2010

C Programming Assignments with Answers (21 Questions)

The following programs were solved by various friends. Hence if there are any mistakes/bugs/errors in the program kindly comment on at the end of the Post. We will try to rectify it. For downloading all the programs in a single PDF file: click this link http://pradeepkumar.org/2010/12/c-programming-assignments-with-answers-21-questions.html Question 1 The straight line method of computing the yearly depreciation of the value of an item is given by Depreciation = (Purchase Price – Salvage Value) / years of service. Write a program to determine the salvage value of an item when the purchase price, years of service and the annual depreciation are given. Program #include<stdio.h> #include<conio.h> int main() { int yr; float price,dep,salvalue; printf("enter the purchase price,years of service, annual depreciation"); scanf(" %f %d %