Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The Golden Sales lIliompany pays it salespeople R115!) for each item they sell. Given the number of items sold by a salesperson, your program should
The Golden Sales lIliompany pays it salespeople R115!) for each item they sell. Given the number of items sold by a salesperson, your program should first print a heading, then calculate, and print the amount of pay due. A function named print Headi mg {with no parameters} displays the following message: *************************************************** GOLDEN SALES mm This program inputs the number of items sold by a Salesperson and prints the amount of pay due. ******ii***i****i*********i***i****ii********i****i Another function, calculatEPay displays the amount pay due to a salesperson. The function multiples the numer of items sold with 12.53 to compute the pay to he payed out. The function has one 1iralue parameter items representing the number of items sold by a salesperson. A main program inputs an integer Iiu'alue [items]. It displays the description of the program by calling the function printHe-ading. The program then calls the function calculate-Pay to calculate and display the amount of pay due. Sample run: ******i****i*i**i*********i***i****i*********i***** GOLDEN SALES mm This program inputs the number of items sold by a Salesperson and prints the amount of pay due. *tiiiiiiiitiiitiiiittiiitiiiitiititiiittiiittiiitti Please input the number of items sold 125 The amount pay due is R 1562.5D Change the program so that the pay amount is displayed in the main program instead of function calculatePay. Submit a printout of the program and the output
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started