Question: QUESTION ONE a) Write single line statements to accomplish the following: i)Decrement a variable by 1 ii)Set up a constant named PAYRATE as 1000.00 using
QUESTION ONE
a)Write single line statements to accomplish the following:
i)Decrement a variable by 1
ii)Set up a constant named PAYRATE as 1000.00 using define preprocessor directive.
iii)Test if age is below 18 or above 65
iv)Print five blank lines, then print the message "its over".
b)A program is required to calculate an employee's net salary from the gross pay. The net salary is given by gross pay less deductions. Deductions include: 25% of gross pay as tax, KSh.250 as NSSF contribution and KSh.320 as NHIF contribution.
i)Design an algorithm (flowchart OR pseudocode) to illustrate this program.
ii)Implement the above program in C
c)Discuss and give examples of THREE major control structures used in the C programming language.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
