
please wait
nockson wrote: |
---|
Write a program that prompts the user to input two positive integers. The program should have a void function named multiple that has four parameters (two value parameters and two reference parameters). This function received two positive integers from the function main. After the multiple function performs several calculations, the function main should output how many numbers |
Write a program that prompts the user to input two positive integers. |
nockson wrote: |
---|
A painting company has determined that for every 8 square meters of wall space, one litre of paint and 1.5 hours of labour will be required. The company charges R55 per hour of labour. You have been tasked to write a program that allows the user to enter the square metres of wall space for a number of painting jobs and the price of the paint per litre used for each job. The program should then display the following data for each job: The number of litres of paint required The hours of labour required The cost of the paint The labour charges The total cost of the paint job. The program has the following functions: void inputAndValidate function that have two reference parameters, namely one parameter for the wall space in square metres (thus of type double), and the other for the price of the paint per litre (also of type double). This function reads values from keyboard. The function does not accept a value of less than R20 per litre for the price of the paint, and it uses a do…while loop to display a message until the user enters a value greater than or equal to R20 for the price of the paint per litre. void determineLabourAndPaint with three parameters: one value parameter to supply the wall space; and two reference parameters for the hours of labour and litres of paint required which should be returned to the main function. ITCP112 – Take Home Assessment S1 2020 | V1.0 Page 5 of 5 void determineCost with five parameters: three value parameters to supply the hours of labour, litres of paint required and the price of the paint per litre; and two reference parameters for the cost of the labour and the cost of the paint. Remember that the company charges R55 per hour of labour. |
|
|
PLEASE ALWAYS USE CODE TAGS (the <> formatting button), to the right of this box, when posting code. Along with the proper indenting it makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/ http://www.cplusplus.com/articles/z13hAqkS/ Hint: You can edit your post, highlight your code and press the <> formatting button. This will not automatically indent your code. That part is up to you. You can use the preview button at the bottom to see how it looks. I found the second link to be the most help. |
A painting company has determined that for every 8 square meters of wall space, one liter of paint and 1.5 hours of labor will be required. The company charges R55 per hour of labor. You have been tasked to write a program that allows the user to enter the square meters of wall space for a number of painting jobs and the price of the paint per litre used for each job. The program should then display the following data for each job: ● The number of liters of paint required ● The hours of labor required ● The cost of the paint ● The labor charges ● The total cost of the paint job. The program has the following functions: ● void inputAndValidate function that have two reference parameters, namely one parameter for the wall space in square meters (thus of type double), and the other for the price of the paint per liter (also of type double). This function reads values from keyboard. The function does not accept a value of less than R20 per litre for the price of the paint, and it uses a do…while loop to display a message until the user enters a value greater than or equal to R20 for the price of the paint per liter. ● void determineLabourAndPaint with three parameters: one value parameter to supply the wall space; and two reference parameters for the hours of labor and liters of paint required which should be returned to the main function. ITCP112 – Take Home Assessment S1 2020 | V1.0 Page 5 of 5 ● void determineCost with five parameters: three value parameters to supply the hours of labor, liters of paint required and the price of the paint per liter; and two reference parameters for the cost of the labor and the cost of the paint. Remember that the company charges R55 per hour of labor. |
You have been tasked to write a program that allows the user to enter the square meters of wall space for a number of painting jobs and the price of the paint per litre used for each job. |
|
|
|
|
● void inputAndValidate function that have two reference parameters, namely one parameter for the wall space in square meters (thus of type double), and the other for the price of the paint per liter (also of type double). This function reads values from keyboard. The function does not accept a value of less than R20 per liter for the price of the paint, and it uses a do…while loop to display a message until the user enters a value greater than or equal to R20 for the price of the paint per liter. |
|
|