[Solved] C Programming Write Functions Called Main Function Produce Outputs Pseudocode Main Functio Q37182317
C programming—Write the functions that are called in themain() function to produce these outputs.
//Pseudocode for the main() function, you will have to make itto 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 fromuser.
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(‘Thesalesperson must reimburse thecompany’)
}
return 0;
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
Output should look like
Enter the monthly sales: 9500
Enter the amount of advanced pay, or enter 0 if no advanced paywas 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 paywas given.
Advanced pay: 2000.00
The pay is $-560.00
The salesperson must reimburse the company.
Expert Answer
Answer to C programming—Write the functions that are called in the main() function to produce these outputs. //Pseudocode for th… . . .
OR

