Write a program that will determine the salary of commission based employees. For each employee, the following facts are available:
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Write a program that will determine the salary of commission based employees. For each employee, the following facts are available:
a) Employee id (a positive integer)
b) Gross sales in dollars
c) Commission rate
d) Base Salary
The program should use a while statement to input each of these facts, calculate the new salary as (= base salary + gross sales * commission rate).
Sample output:
Enter employee id (or -1 to quit): 100
Enter gross sales: 5000.00
Enter commission rate: 0.04
Enter base salary: 500.00
Salary is $700.00.
Enter employee id (or -1 to quit): -1
C++
Nothing too advance please. I'm a beginner
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images