Question: (a) Write three (3) syntaxes of if control statements with an example for each. (b) Write a C program to read the names and annual

(a) Write three (3) syntaxes of if control statements with an example for each. (b) Write a C program to read the names and annual sales amount of five (5) sales person, and calculate amount of incentive based on their annual sales amount as follows: RM 0 to RM 10,000 10% of sales amount, RM 1,000 to RM 20,000 - 20% of sales amount, RM 2,000 to RM 30,000 - 25% of sales amount. You may use array statement where necessary, different names and amounts from the given output example. Arrange your input and output data as follows: [10 marks] please enter names and sales anount for five (5) workers: worker [0]- amar 1000 worker [1] ameer 2000 worker [2]- aisyah 3000 worker [3] annas 4000 worker [4]- ainan 5000 worker (0) name : amar sale: 1000.00 incentive = 100.00 worker [1] name : ameer sale: 2000.00 incentive = 200.00 worker [2] name : aisyah sale: 3000.00 incentive - 300.00 worker [3] name : annas sale: 4000.00 incentive = 400.00 worker [4] name: aiman sale: 5000.00 incentive - 500.00 Process returned @ (@x@) execution tine : 89.602 s Press any key to continue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
