Cosc101 Exam 16 - 17
Cosc101 Exam 16 - 17
I) a) Identify errors in the following line of code and indicate each erroi: as syntax error,
.,,.-- semantic error, and logical error. Indicate with line numbers.
2).A software is to compute the monthly takehome of Thus, you need to write a C program using function
all category of employees of an establishment. The technique that will:
employee taxation is bas.ed on the following
constraints: i. Allow input of two integers
- I ; -frbasic salary i~ less than'--orequal to NS000,5 % ot iL::--ereate ,_ four- functions - called' addition,
subtraction, multiplication, and division
basic salary is deducted as tax otherwise 8%
deducted. iii. Output the result of addition, subtraction,
• Also 10% of the employee gross pay should be multiplication, and division.
deducted as part of pension scheme.
• It is require that each employee pay slip should Using for-loops, write a C program to compute
contain employee number, name, total allowance, average score of 300 students in 400 level offering
tax, basic salary, gross pay and Net pay. Software Engineering. The program will
Analyze this problem by stating the input, processing 1. Take in scores of 300students
and output requirements and draw a flow chart ii. Find the sum of scores of all the students
showing the procedure for the implementation of this iii. Find the average score
software: J HJNTS: J