Вы находитесь на странице: 1из 3

Semester – I (ODD – 2017) B.Sc (CS) / B.

Sc (IT) / BCA
RATHNAVEL SUBRAMANIAM COLLEGE OF ARTS & SCIENCE (AUTONOMOUS)
SCHOOL OF COMPUTER STUDIES (UG)
C PROGRAMMING
UNIT- I ASSIGNMENT
1. Body Mass Index Calculator

(Test-Drive: Body Mass Index Calculator) By recent estimates, two-thirds of


the people in the United States are overweight and about half of those are obese.
This causes significant increases in illnesses such as diabetes and heart disease. To
determine whether a person is overweight or obese, you can use a measure called
the body mass index (BMI). The United States Department of Health and Human
Services provides a BMI calculator at www.nhlbisupport.com/bmi/. Use it to calculate
your own BMI.

2. Car-Pool Savings Calculator

(Car-Pool Savings Calculator) Research several car-pooling websites. Create an


application that calculates your daily driving cost, so that you can estimate how
much money could be saved by car pooling, which also has other advantages such
as reducing carbon emissions and reducing traffic congestion. The application should
input the following information and display the user’s cost per day of driving to
work:

a) Total miles driven per day.


b) Cost per gallon of gasoline.
c) Average miles per gallon.
d) Parking fees per day.
e) Tolls per day.

3. Credit Limit Calculator

(Credit Limit Calculator) Develop a C program that will determine if a department


store customer has exceeded the credit limit on a charge account. For each
customer, the following facts are available:

a) Account number
b) Balance at the beginning of the month
c) Total of all items charged by this customer this month
d) Total of all credits applied to this customer's account this month
e) Allowed credit limit

The program should input each fact, calculate the new balance (= beginning balance
+ charges – credits), and determine whether the new balance exceeds the
customer's credit limit. For those customers whose credit limit is exceeded, the
Semester – I (ODD – 2017) B.Sc (CS) / B.Sc (IT) / BCA
program should display the customer's account number, credit limit, new balance
and the message “Credit limit exceeded.” Here is a sample input/output dialog:

4. Salary Calculator

(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. Here is a sample input/output dialog:
Semester – I (ODD – 2017) B.Sc (CS) / B.Sc (IT) / BCA
5. Hollow Square of Asterisks

Write a program that reads in the side of a square and then prints that square out of
asterisks. Your program should work for squares of all side sizes between 1 and 20.
So that it prints a hollow square. For example, if your program reads a size of 5, it
should print.

Вам также может понравиться