1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
galina1969 [7]
3 years ago
12

Write a C++ program in which you declare variables that will hold an hourly wage, a number of hours worked, and a withholding pe

rcentage. Prompt the user to enter values for each of these fields. Compute and display net weekly pay, which is calculated as hours times rate, minus the percentage of the gross pay that is withholding.
Computers and Technology
1 answer:
stiks02 [169]3 years ago
4 0

Answer:

C++ program: -

//header files

#include <iostream>

//namespace for using input and output stream

using namespace std;

//main function

int main()

{

//declaring the variables

float wg,hrs,pt,np;

//prompt the user to enter the hourly wage

cout<<"Please enter the hourly wage: ";

//storing the value

cin>>wg;

//prompt the user to enter the working hours

cout<<"Please enter the hours worked: ";

//storing the values

cin>>hrs;

//prompt the user to enter to enter the percentage

cout<<"Please enter the withholding percentage: ";

//storing the value

cin>>pt;

//calculating the next week pay

np= (hrs*wg*7)- (hrs*wg*7*pt/100);

//displaying the next week pay

cout<<"Net weekly pay: "<<np;

//return statement

return 0;

}

Explanation:

In the above program, the variable used are given below: -  

float wg,hrs,pt,np;

wg:- To store the hourly wage

hrs:- To store the working hours  

pt:- To store the percentage

np:- To store the next week payment

The input and the output streams that are used to input and storing the values are cin and cout.

To calculate the next week payment below formula is used:-

np= (hrs*wg*7)- (hrs*wg*7*pt/100); 

Output :-

Please enter the hourly wage: 100                                                                                                                          

Please enter the hours worked: 8                                                                                                                          

Please enter the withholding percentage: 5                                                                                                                

Net weekly pay: 5320

You might be interested in
If Windows does not automatically detect a newly added device, to get the device recognized and the drivers installed, you shoul
Artyom0805 [142]

Answer:

Update the device driver

Explanation:

Devices drivers are softwares used to link a component of the computer to the operating system functionality.

It normally comes with the installed operating system, but most plug and play devices , come with a little built-in OS that runs once it is plugged in.

If a device is not recognized, update the driver software and restart the system.

3 0
2 years ago
Historia da inteligencia artificial
choli [55]

Answer:

hshdhwvevwuwijwvww

Explanation:

wwgwvisgwgqiwieoiw

5 0
2 years ago
Read 2 more answers
Non-preemptive Shortest Job First (SJF) scheduling policy is not optimal if:
ivann1987 [24]

Answer:

The answer is A

Explanation:

Basically, Shortest job first (SJF) is a scheduling policy that selects jobs on queue for execution  within a short execution time.

From the definition of SJF above, it means that there are a lot of process on queue and the (SJF) job is to receive processes on queue to execute within a short execution time.

Therefore, if all the jobs or process arrives at the SJF at the same time, the SJF will forfeit one of its major purpose which is scheduling of jobs.

That will therefore not make Non-preemptive Shortest Job First (SJF) not function at its optimal point.

4 0
2 years ago
What special enterprise VPN supported by Cisco devices creates VPN tunnels between branch locations as needed rather than requir
castortr0y [4]

Answer:

Dynamic Multipoint VPN

Explanation:

4 0
2 years ago
Sidney works in the accounting department. His boss just assigned him a task that involves creating budget formulas for the comp
madreJ [45]
In excel spreadsheets, Sidney need to consider specifying relationships between the information you have stored in your spreadsheets when creating formulas. The elements that will help you understand using spreadsheet are the constants, operators, references and functions. This will enable her to use the formulas, without hassle in spreadsheets.
6 0
2 years ago
Other questions:
  • A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To ac
    11·2 answers
  • The following memo does not follow the correct format. What should be changed? To: Stacy, Allen, and Emma Date: August 12, 2012
    10·2 answers
  • You are to create a program using Python that asks the user for a nonnegative number, then computes the mean and variance using
    15·1 answer
  • What may happen if a large number of computer users are attempting to access a web site at the same time that you are
    9·2 answers
  • When you set the position property for a block element to fixed, the element
    5·1 answer
  • 5. RAM IS YOUR SYSTEM’S-
    14·2 answers
  • wants to redesign the user interface. The customer service agents use ________ to enter explicit statement to invoke operations
    11·1 answer
  • Which of these is NOT a standard part of the outro of a podcast?
    15·1 answer
  • Who invented computer ?​
    9·2 answers
  • Which web-authoring software enables users to create sophisticated web pages without knowing any html code?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!