Make a program that asks the user for the hours worked for the week and the hourly rate. The basic salary is computed as:
Salary = hours worked*hourly rate
Bonuses are given: Bonus of 500 pesos Bonus of 250 pesos Bonus of 150 pesos No. of hours > 45 No of hours > 40 and <= 45 No of hours > 35 and <= 40 Display the basic salary, bonus and the total salary (basic salary + bonus) for the week.
Develop a C++ program to compare weights of two persons and displays the most weight between two using this pointer.
Make a program that will accept an integer and loop from 1 to that integer. Then, print all numbers from that range that are greater than 3.
The first lines will contain message prompts to input the decimal numbers.
The last line contains the sum of all negative numbers with 3 decimal places.
Example Output:
Enter n:8
4
5
6
7
8
Write the definition of the value-returning function payCheck that calculates and returns the
amount to be paid to an employee based on the hours worked and rate per hour. The hours
worked and rate per hour are stored in the variables hours and rate , respectively, of the
function main . The formula for calculating the amount to be paid is as follows: For the first 40
hours, the rate is the given rate; for hours
over 40, the rate is 1.5 times the given rate.
Make a program that asks the user for the hours worked for the week and the hourly rate. The basic salary is computed as:
Salary = hours worked*hourly rate
write a program that counts from zero up to a user-specified number. For example, if the user enters the number 5, your program should display the numbers: 0, 1, 2, 3, 4, 5. You cannot use an if-statement for this part!
Modify the solution to Brute-Force Attack to include a maximum of 5 passcode attempts. Each time the user enters an incorrect passcode, they should be prompted of how many passcode attempts remain. If there are 5 failed passcode attempts the while loop should break and inform the user that the authorities have been alerted!
You are an inexperienced hacker trying to find the correct passcode to enter a safe.Write a program that defines the correct passcode of 246, and allows users to enter passcode attempts until they reach the correct number. Your program should use a while loop to allow the user to keep entering passcode attempts until correct and should use a break statement to exit the loop once the correct passcode is entered
Create a structure called employee that contains two members: an employee number (type int) and
the employee’s salary (in dollars; type float). Ask the user to fill in this data for three employees,
store it in three variables of type struct employee, and then display the information for each
employee.
A point on the two-dimensional plane can be represented by two numbers: an x coordinate and a y
coordinate. For example, (4,5) represents a point 4 units to the right of the vertical axis, and 5 units
up from the horizontal axis. The sum of two points can be defined as a new point whose x
coordinate is the sum of the x coordinates of the two points, and whose y coordinate is the sum of
the y coordinates. Write a program that uses a structure called point to model a point. Define three
points, and have the user input values to two of them. Then set the third point equal to the sum of the
other two, and display the value of the new point. Interaction with the program might look like this:
Enter coordinates for p1: 3 4
Enter coordinates for p2: 5 7
Coordinates of p1+p2 are: 8, 11