Skip to content

CSC_121 Assignment to develop calculators for different purposes using the C sentinel controlled loop and iteration.

Notifications You must be signed in to change notification settings

Muhdal-Amin/CSC_121_ch3

Repository files navigation

CSC_121

C - How to program 8th edition by Paul Deitel and Harvey Deitel. Chapter 3, Exercises 3.8, 3.17, 3.18, 3.19, 3.20

Exercise 3.17 - Class Average Calculator

A class of students took a quiz. The grades (integers in the range of 0 to 100) for this quiz are made available to you. Develop a C program that will process an arbitrary number of grades and calculate the class average each time the program is run.

Exercise 3.17 - Mortgage Calculator

Develop a C program to calculate the interest accrued on a bank customer's mortgage. For each customer, the following facts are available: a) the account number b) the mortgage amount c) the mortgage term d) the interest rate The program should input each fact, calculate the total interest payable ( = mortgage amount × interest rate × mortgage term), and add it to the mortgage amount to get the total amount payable. It should calculate the required monthly payment by dividing the total amount payable by the number of months in the mortgage term. The program should display the required monthly payment rounded off to the nearest dollar. The program should process each customer's account at a time.

Exercise 3.18 - Sales Commission Calculator

One large chemical company pays its salespeople on a commission basis. The salespeople receive $200 per week plus 9% of their gross sales for that week. For example, a salesperson who sells $5000 worth of chemicals in a week receives $200 plus 9% of $5000, or a total of $650. Develop a program that will input each salesperson’s gross sales for last week and will calculate and display that salesperson’s earnings. Process one salesperson's figures at a time.

Exercise 3.19 - Interest Calculator

The simple interest on a loan is calculated by the formula interest = principal * rate * days / 365; The preceding formula assumes that rate is the annual interest rate, and therefore includes the division by 365 (days). Develop a program that will input principal, rate and days for several loans, and will calculate and display the simple interest for each loan, using the preceding formula.

Exercise 3.20 - Salary Calculator

Develop a program that will determine the gross pay for each of several employees. The company pays “straight time” for the first 40 hours worked by each employee and pays “time-and-a-half” for all hours worked in excess of 40 hours. You’re given a list of the employees of the company, the number of hours each employee worked last week and the hourly rate of each employee. Your program should input this information for each employee and should determine and display the employee's gross pay.

About

CSC_121 Assignment to develop calculators for different purposes using the C sentinel controlled loop and iteration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages