I SEM BE(EEE,MECH,ECE,CIVIL,MET,AUTO,PROD,BIO-MED,ICE,ROBO)/BTECH(FT,TEXT,BIO) PROBLEM SOLVING AND C PROGRAMMING 2014-2015(ODD SEMESTER) PROBLEM SHEET -1
Week 2- Simple Programs 1. Calculate the electricity bill by reading unit in two values representing the old and new meter readings. Assume that the cost of each unit is Rs. 7.13 /- and that there is also a fixed charge of Rs. 30.50/-. 2. The number of Bacteria, B in a certain culture that is subject to refrigeration can be approximated by the equation B=300,000e -3.2t , t is the time in hours. Write a C program that calculates the number of Bacteria in the culture if it has been refrigerated according to the users choice and display the result. 3. Write a program that computes the tax and tip on a restaurant bill for a person with a Rs.50 meal charge. The tax should be 6.75 percent of the meal cost. The tip should be 15 percent of the total after adding the tax. Display the meal cost, tax amount. Tip amount and total bill on the screen. 4. Compute the mileage reimbursement for a pizza door delivery man at a rate of Rs.5 per mile. Prompt the user to enter the beginning odometer reading, the odometer reading by the end of the day and display the total miles travelled by him and the reimbursement for the given rate above per mile. 5. The volume of oil stored in an underground 300- foot deep cylindrical tank is determined by measuring the distance from the top of the tank to the surface of the oil. Using the distance and the radius of the tank compute the volume of oil in the tank using the formula Volume = radius 2 (300-distance). 6. Write a program to calculate the property tax. Property tax is calculated on 92% of the assessed value of the property. For Example if the assessed value is Rs.2,00,000, the property tax is on Rs.1,84,000. Assume the property tax is Rs 1.05 for each Rs 100 of the assessed value. Your program should prompt the user to enter the assessed value of the property. Print the output in the following format. Assessed Value Rs.2,00,000 Taxable Amount Rs 1,84,000 Tax Rate for each Rs 100 1.05 Property tax 1932.00 7. A customers gas bill is calculated by adding a standard charge of 9.02% per day to charge for gas, calculated by 1.43% per cubic meter. The whole bill is then liable for a VAT at 8%. Write a program that reads the number of days, the initial and final meter readings and calculates and prints the bill. Use const for various rates of charging. Standing Charge 9.02% for 61 days 5.50 Gas consumption 1632.1 @ 1.43% 23.39 Sub Total 28.89 VAT at 8% 02.31 Total 31.20