Assignment Unit - I-Upd
Assignment Unit - I-Upd
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
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.