Professional Documents
Culture Documents
CDCS240 1A - Lab Assignment 1
CDCS240 1A - Lab Assignment 1
PROGRAMMING
(CSC415)
LAB ASSIGNMENT 1
(Topic 2-5%)
Questions
1) Calculate the net salary for a worker. The net salary is the different of gross salary and
total deduction. The gross salary is the total of basic salary and total allowances. The
allowances are housing allowance, telephone allowance and transportation. Each of
allowance is RM500, RM700, and RM750. The worker has to contribute to EPF
deduction 9% of gross salary and contribution for SOCSO 2% of gross salary. Display the
worker name, employee id, basic salary, total allowances, gross salary, total deduction,
and the net salary that he/she get. Then display the employee salary information as an
example below:
*use setprecision()
Page 3 of 5
CODING
Page 4 of 5
OUTPUT SCREEN
Page 5 of 5
RUBRICS
Input Statement 3
Output Statement 5
Process 8
Structure of Codes 2
(pre-processor,
comments,
declaration
variables, good
styles)
Output Screen 2
Total 20