I have been asked 3 questions and would like someone to give me the code for each of these questions so that i can find out the answer.


A salesperson earns a commission on the value of sales. The following table shows the scale of the commission. Write a program to input the value of sales, and calculate and output the commission.

values of sales % commission
£1 - £999 1
£1000 - £9999 5
£10000 - £99999 10


A worker is paid at the hourly rate of £8 per hour for the first 35 hours worked. Thereafter overtime is paid at 1.5 times the hourly rate for the next 25 hours worked and 2 times the hourly rate for further hours worked. Write a program to input the number of hours worked per week, calculate and output the overtime paid.


Write a program to input two real numbers and give the user the choice of adding, subtracting, multiplying or dividing these numbers. Perform the appropriate calculation and display the result. Your program should trap any attempt to divide by zero.

Votes + Comments
8 Years
Discussion Span
Last Post by crazyboy

3 responses:

1) Forum Rules require that the title be descriptive. Please avoid generic titles like "3 Questions" instead describe what the questions relate to.

2) Here at Daniweb We only give homework help to those who show effort . You need to attempt the questions yourself. If you get stuck with a specific issue then come back with the code you have written so far and we will gladly give you some pointers.

3) When tackling any problem (real or code based) start by breaking it down into each required step. From those steps right a simple pseudocode that walks through what you need to do, then convert that into actual code syntax. I'll get you started:

-read in value from user
-is value less than 1000
-if yes - commision = 1%
- if no - is vallue less than 10000
- if yes - commision = 5%
- if no - commision = 10%
-output commision

Edited by Geekitygeek: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.