1)In an Internet Café customers are charged as follows for browsing:
• First hour or part of an hour – 40 Rupees
• Next four hours – 30 Rupees per hour or part of an hour
• For each hour after that – 20 Rupees per hour or part of an hour
Write a C program using the “Else-If” statement such that when the user enters the number of hours of Internet Connection, the program displays the amount to charge from the customer.
Example: If a user browsed the Internet 3 hours and 15 minutes,
Charge = 40 Rs for the 1st hr+30*3 Rs for the next 2 hr and 15 min
2)A shop sells electrical appliances such as TVs, Fridges, Fans, and Washing Machines etc. In case the customers cannot pay the full amount to purchase an appliance the shop supports easy payment schemes, such that the customers can make the payments via monthly installments.
Four payment schemes are supported as given below:
Scheme Payment Duration No. of Installments Interest Rate %
1 6 months 6 6
2 1 year 12 8
3 1.5 years 18 10
4 2 years 24 12
Monthly Installment = (Price of the Appliance + Interest) / No. of Installments
Example: A customer buy a TV worth of 60 000 Rs, and agree to make the payments with in 1 year. i.e. The customer had selected the 2nd payment scheme.
Monthly Installment = (60 000 + (60 000*8/100)) / 12 = 5400 Rs.
Write a C program that calculates and display the value monthly installment when the user input the price of the appliance and the payment scheme. Use the “Switch” statement.
Plz help me my exams are near .
