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
SOMEONE PLEASE HELP ME WITH THIS PLEASE HELP ME PLEASE!!!!!!
liq [111]

Answer:

last one

Explanation:

8 0
2 years ago
Doe's anyone know how to access developer mode on a Chromebook laptop if enterprise enrollment blocks it?
Mekhanik [1.2K]
♥ <span>Boot your Chromebook into recovery Mode
(Escape refresh and power keys all need to be help down)
It </span><span>will then  reboot into recovery mode
♥ </span><span>Press Ctrl+D at the recovery screen
♥ </span><span>To turn the Verification off you will need to press the enter button.
♥ and then you have it :D 

</span>
8 0
3 years ago
Read 2 more answers
Which key(s) will launch the Spelling Checker dialog box? F8 F7 Ctrl+H F2
KIM [24]

Answer:

F7

Explanation:

Mostly in MS Office products, although a lot of other products will mimic the same well known key sequences as a way of enticing you to their platform.

6 0
2 years ago
Read 2 more answers
Which statement accurately compares the restart at 1 and continue numbering featured of word
Andrews [41]

Answer: the continue numbering feature can be used to maintain the numbering order in a list and the restart at 1 feature can be used to make a new list

Explanation:

7 0
3 years ago
Read 2 more answers
1. Describe how research and development influence design. Cite specific examples of how research and development influence desi
vladimir1956 [14]

Answer:

so i research and found this,

Development is when findings of a research are utilized for the production of specific products including materials, systems and methods. Design and development of prototypes and processes are also part of this area. Engineering is utilization of these plans and research to produce commercial products.

4 0
3 years ago
Other questions:
  • Try using the inv command to find the inverse of the matrix Notice the strange output. Include your command and the output in yo
    10·1 answer
  • Question 1 (1 point)
    10·2 answers
  • Why would it be beneficial to preview a page before printing?
    8·1 answer
  • Is it necessary that every autonomous system use the same intra-AS routing algorithm? Why or why not?
    10·1 answer
  • Explain briefly the purpose of the Computer Management Console in Microsoft Windows.
    12·1 answer
  • A selected graphic appears surrounded by a(n) ______, which has small squares and circles around its edges.
    7·1 answer
  • Describe the importance of human interaction in a computing system.
    14·2 answers
  • 11) A single inheritance model means: * A) A class can only have one parent class (superclass) B) A class can only have one chil
    7·1 answer
  • Consider the following code segments that are potential replacements for /* missing code */.
    6·1 answer
  • You are designing an exciting new adventure game and you want to attempt to explain where items that are carried by the player a
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!