(a) writing the definition of the function initialized thatinitialialize x and y
ID: 3613948 • Letter: #
Question
(a) writing the definition of the function initialized thatinitialialize x and y to 0, and z to the blankcharacter (b) write the definition of the function getHoursRatethat prompts the user to input the hours worked and rate perhour to initialize the variables hours and rate of the functionmain. (c) Write the definition of the value-returning functionspayCheck that calculates and return the amount of be paid to an employee based on the ours worked and rate her hour. Theours worked and rate per hour are stored in the variables hours andrate, respectively, of the followas. for the first 40 hours,the rate is the given rate; for hours over 40, the rate is 1.5times the given rate. (d) write the definition of the function printCheck thatprints the ours worked, rate per hour, and the amount due. (e) Write the definition fo the function funcOne that promptsthe user to the value of x by assigning the value of the expression2 times the old value of x plus the value of y minus the valueentered by the user. (f) write the definition of the function nextChar that setsthe value of z to the next character stored in z. (g) write the definition of a function main that test each ofthese fuctions. (a) writing the definition of the function initialized thatinitialialize x and y to 0, and z to the blankcharacter (b) write the definition of the function getHoursRatethat prompts the user to input the hours worked and rate perhour to initialize the variables hours and rate of the functionmain. (c) Write the definition of the value-returning functionspayCheck that calculates and return the amount of be paid to an employee based on the ours worked and rate her hour. Theours worked and rate per hour are stored in the variables hours andrate, respectively, of the followas. for the first 40 hours,the rate is the given rate; for hours over 40, the rate is 1.5times the given rate. (d) write the definition of the function printCheck thatprints the ours worked, rate per hour, and the amount due. (e) Write the definition fo the function funcOne that promptsthe user to the value of x by assigning the value of the expression2 times the old value of x plus the value of y minus the valueentered by the user. (f) write the definition of the function nextChar that setsthe value of z to the next character stored in z. (g) write the definition of a function main that test each ofthese fuctions.Explanation / Answer
please rate - thanks #include using namespace std; void init(int&,int&,char&); void getHoursRate(double&,double&); double payCheck(double,double); void printCheck(double,double,double); void funcOne(int&,int); void nextChar(char&); int main() {int x, y; char z; double rate,hours; double salary; init(x,y,z); getHoursRate(hours, rate); salary=payCheck(hours, rate); printCheck(hours, rate,salary); coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.