These Questions from a pervious exam i need your help to solve it:


1- Write a C++ program that uses a function called calcPay( ) to calculate the total wages of an employee. The total wages are calculated as follows. Total wages= (number of hours worked in a week*hourly pay rate) + vehicle allowance. Get the values of the total number of hours worked and the vehicle allowance from the user. Assume that the Hourly pay rate is R.O.7

2- Write a C++ program that calculates and displays the charges for a person‟s stay in a hotel. First, the program should ask if the user wants a normal room or a deluxe room. If the user selects a normal room, the following charges apply.
 R.O. 25 per day of stay in the hotel.
 R.O 10 per day for Breakfast and Lunch
 R.0. 5 for service charges.(fixed for all days)
If the user selects a deluxe room, the following charges apply.
 R.O. 35 per day of stay in the hotel.
 R.O 15 per day for Breakfast and Lunch
 R.0. 5 for service charges.(fixed for all days)
The program should use two functions to calculate the total charges. Both the functions should accept the number of days of stay and then calculate and display the total charges.

Thank you :icon_smile:

ROTFL : Thank you :icon_smile:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.