Menu

[Solved] C Programing Write Functions Called Main Function Produce Outputs Requirements Function De Q37174857

C programing—Write the functions that are called in the main()function to produce these outputs.

Enter the monthly sales: 14550.00 Enter the amount of advanced pay, or enter 0 if no advanced pay was given Advanced pay: 100

Requirements for the function – determine_comm_rate()

Sales less than 10000.00 rate:  .10

Sales from 10000.00 to 14999.99 rate: .12

Sales from 15000.00 to 17999.99 rate: .14

Sales from 18000.00 to 21999.99 rate: .16

Sales greater than 21999.99 rate: .18  

Enter the monthly sales: 14550.00 Enter the amount of advanced pay, or enter 0 if no advanced pay was given Advanced pay: 1000.00 The pay is $746.00 Enter the monthly sales: 9500 Enter the amount of advanced pay, or enter 0 if no advanced pay was given Advanced pay: 0 The pay is $950.00 Enter the monthly sales: 12000.00 Enter the amount of advanced pay, or enter 0 if no advanced pay was given Advanced pay: 2000.00 The pay is $-560.00 The salesperson must reimburse the company //Pseudocode for the main() function, you will have to make it to C codes //This program calculates a salesperson’s pay int main() # Get the amount of sales from user sales -get_sales() // Get the amount of advanced pay from user advanced_pay-get_advanced_pay() //Determine the commission rate comm_rate determine_comm_rate(sales) // Calculate the pay pay sales * comm_rate – advanced_pay // Display the amount of pay print this(” The pay is $ %f’ , pay) // Determine whether the pay is negative if (pay < 0) print this(‘The salesperson must reimburse the company’) return 0; Show transcribed image text Enter the monthly sales: 14550.00 Enter the amount of advanced pay, or enter 0 if no advanced pay was given Advanced pay: 1000.00 The pay is $746.00 Enter the monthly sales: 9500 Enter the amount of advanced pay, or enter 0 if no advanced pay was given Advanced pay: 0 The pay is $950.00 Enter the monthly sales: 12000.00 Enter the amount of advanced pay, or enter 0 if no advanced pay was given Advanced pay: 2000.00 The pay is $-560.00 The salesperson must reimburse the company //Pseudocode for the main() function, you will have to make it to C codes //This program calculates a salesperson’s pay int main() # Get the amount of sales from user sales -get_sales() // Get the amount of advanced pay from user advanced_pay-get_advanced_pay() //Determine the commission rate comm_rate determine_comm_rate(sales) // Calculate the pay pay sales * comm_rate – advanced_pay // Display the amount of pay print this(” The pay is $ %f’ , pay) // Determine whether the pay is negative if (pay

Expert Answer


Answer to C programing—Write the functions that are called in the main() function to produce these outputs. Requirements for the… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *