The Ok Sales Company Pays It Salespeople R12 50 For Each Item They Sell Given The Nu 3521954

The OK Sales Company pays it salespeople R12.50 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 printHeading (with no parameters) displays the following message: *************************************************** OK BAZAAR SALES COMPANY This program inputs the number of items sold by a Salesperson and prints the amount of pay due. ***************************************************
Another function, calculatePay displays the amount pay due to a salesperson. The function
multiples the number of items sold with 12.50 to compute the pay to be payed out. The function
has one value parameter items representing the number of items sold by a salesperson.
A main program inputs an integer value (items). It displays the description of the program by
calling the function printHeading. The program then calls the function calculatePay to
calculate and display the amount of pay due.
Sample run: *************************************************** GOLDEN SALES COMPANY This program inputs the number of items sold by a Salesperson and prints the amount of pay due. *************************************************** Please input the number of items sold 125 The amount pay due is R 1562.50
Question 1a Write the functions printHeading and calculatePay as well as the main program
Question 6b Change the program so that the pay amount is displayed in the main program instead of function calculatePay. Save a printout of the program and the output as Tutorial2.cpp Run your program with the number of items = 100

Prof. Angela

4.6/5

Calculate Price


Price (USD)
$
Open chat