Question: Please use iostream, if statement ,while statement, cstdlib ,(time.h) srand and so on to finish this program. There are two examples attached below. Please show
Please use iostream, if statement ,while statement, cstdlib ,(time.h) srand and so on to finish this program.
There are two examples attached below. Please show step by step thanks!



Please use iostream, if statement ,while statement, cstdlib ,(time.h) srand and so on to finish this program.
There are two examples attached below. Please show step by step thanks!


Description A salesperson also receives a bonus at the end of each month, based on the following criteria: If the salesperson has been with the store for five years or less, the bonus is $10 for each year that he or she has worked there. If the salesperson has been with the store for more than five years, the bonus is $20 for each year that he or she has worked there. The salesperson can earn an additional bonus as follows: If the total sales made by the salesperson for the month are at least $5.000 but less than $10.000. he or she receives a 3% commission on the sale. If the total sales made by the salesperson for the month are at least $10,000, he or she receives a 6% conmission on the sale. Prompt and read the monthly salary of the salesperson (double), the number of years he or she has worked (int), and total sales made (double). Your output will be the base salary, the bonus, and the total salary Specifications . Comment all your variables and parts of code that perform calculations, input, and output, etc. . Give your variables meaningful names . Variables must be declared with the correct type . Use constants in your program rather than use literals . Your program needs to terminate if input is not a valid number or if the amount entered is negative (or if the salary is too high, greater than ot equal to $1,500.00) . All decimals need to formatted to two decimal places and all the output must be nicely aligned, refer to the sample output . Only output the bonus and the total after bonuses if some bonus can added to the salary, refer to the sample output Sample Output Jimis -MacBook-Pro Asst04 VaskoDaGamer$ g++ Assignment04.cpp Jimis -MacBook-Pro: Asst04 VaskoDaGamer$ ./a.out Enter years worked 6 Enter monthly salary: 1200.00 Enter sales amount: 6500.54 300.00 $9999.99 Jimis -MacBook -Pro:Asst04 VaskoDaGamer$ ./a. out Enter years worked: -8 Something went wrong. . . Jimis -MacBook-Pro Asst04 VaskoDaGamer$ ./a. out Enter years worked 11 Enter monthly salary: Five We both know that 's not a valid salary... Jimis -MacBook -Pro :Asst04 VaskoDaGamer$ ./a.out Enter years worked: 7 Enter monthly salary: 1687.00 We both know that's not a valid salary.. . Jimis -MacBook-Pro Asst04 VaskoDaGamer$ ./a. out Enter years worked: 24 Enter monthly salary: 1000.00 Enter sales amount:8 Are you giving away things for free?!?!?! Jimis -MacBook -Pro :Asst04 VaskoDaGamer$ ./a.out Enter years worked twelve Something went wrong... Jimis -MacBook -Pro:Asst04 VaskoDaGamer$ ./a. out Enter years worked: 11 Enter monthly salary: 850.00 Enter sales amount: Yes Are you giving away things for free?!?!?! Jimis -MacBook -Pro :Asst04 VaskoDaGamer$ #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
