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
In QBasic, create a number guessing challenge. Your program should generate a random number from 1-
Sergio039 [100]

Answer:

yes

Explanation:

6 0
2 years ago
Match the technology with the appropriate task.
Fiesta28 [93]

Answer:

the number order is

1

5

2

4

3

Explanation:

I am sure it is correct. Thanks :)

3 0
2 years ago
Choices.
Svet_ta [14]

Answer:

1. B

2. D

3. C

4. A

5. B

Explanation:

1. To check the integrity of your hard disk and fix various file system errors, the Windows utility which should be implemented is Check disk (Chkdsk). This utility is always used with the command line interface (CLI) with the command "chkdsk."

2. An event or action took place and it caused damage to data, hardware, software and processing capability of the computer. From the statement given, security risks are being described. Any event or action that is capable of causing a problem to a computer system is considered to be a security risk and should be prevented through the use of an appropriate utility software.

3. Virus is a software program that can infect, damage and disrupts the whole computer system.

4. To protect the whole computer system, the software utility which is needed is an Anti-virus.

5. To avoid losing valuable data to your computer, the most important thing to do is to regularly back-up your files.

7 0
2 years ago
What is the destination ip address when an ipv4 host sends a dhcpdiscover message?
hjlf

The destination ip address when an ipv4 host sends a DHCPDISCOVER message Because a DHCP client does not have a valid IPv4 address, it must use a broadcast IP address of 255.255. 255.255 as the destination address to communicate with the DHCP server.

<h3>What does the DHCP server do when it receives the Dhcpdiscover message?</h3>

When the lease has expired, the client must start over with the DHCPDISCOVER process. The client ends the lease by sending a DHCPRELEASE message to the DHCP server. The server will then return the client's IP address to the available address pool.

<h3>What is a Dhcpdiscover message?</h3>

The DHCPDISCOVER message contains an identifier unique to the client (typically the MAC address). The message might also contain other requests, such as requested options (for example, subnet mask, domain name server, domain name, or static route). The message is sent out as a broadcast.

To learn more about DHCPDISCOVER, refer

brainly.com/question/14407739

#SPJ4

8 0
1 year ago
Please read !!!
prisoha [69]
Don’t stress. You’re no failure if you believe in yourself. Have some faith. Don’t give up and live your life to the fullest. Take care and stay safe!! :)
3 0
3 years ago
Other questions:
  • Write the importance of cyber law? In point .<br>​
    10·2 answers
  • Read the spreadsheet formula below, then answer the question.
    14·2 answers
  • How can you create the first row of the table as the header of the table?
    14·2 answers
  • A difference between crt monitors and flat-panel displays is that most flat-panel displays use digital signals to display images
    8·1 answer
  • Please describe in a few sentences
    14·1 answer
  • Suppose that a server sends four packets of audio data, in 15 seconds each. The first is sent by the server exactly at noon (12:
    14·1 answer
  • Write at least complete set of HTML code to hyperlink to “Home.html”..
    8·1 answer
  • When typing lists in a document, you must use single-spacing between each item in the list.
    8·1 answer
  • LIST THE 7 BEST PROGRAMMING MOVIES 2020-2021.
    9·1 answer
  • assuming the default gateway is connected to the internet, what type of internet access would this server have?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!