void functions

QUESTION 4: VOID FUNCTIONS
A function named printDescription (with no parameters) displays the following message:
***************************************************
This program inputs two numbers (pay rate and hours)
and outputs net pay.
***************************************************
Another function, computePaycheck displays the net pay of an employee. The function takes a rate and time and multiplies them to compute the gross pay of an employee. It then calculates and displays the net pay by subtracting 15% from the gross pay. The function has two value parameters rate and time (hours worked).
A main program inputs a floating point value (payRate) and an integer value (hours). It displays the description of the program by calling the function printDescription. The program then calls the function computePaycheck to calculate and display the net pay.
Sample run:
Welcome to the Pay Roll
***************************************************
This program takes two numbers (pay rate and hours)
and outputs net pay.
***************************************************
Please input the pay per hour
9.50
Please input the number of hours worked
40
The net pay is R 323
We hope you enjoyed this program

Question 4a
Write the functions printDescription() and computePaycheck() as well as the main program.

Question 4b
Change the program so that the net pay is displayed in the
and? what part are you stuck on?
can you help in finding the solution of the whole question
Please note, that this is not a homework site.
We won't do your homework for you.
The purpose of homework is that you learn by doing.
However we are always willing to help solve problems you encountered,
correct mistakes you made in your code and answer your questions.


We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes
you didn't made and answer questions you didn't ask. To get help you should do
something yourself and get real problems with something.
If your problem is "I don't understand a thing",
then you should go back to basics and study again.
Topic archived. No new replies allowed.