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
Should I Buy a 2070 super or 2060 super
fiasKO [112]

Answer:

Which ever one you want

Explanation:

Make your heart happy

8 0
3 years ago
unittttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
alukav5142 [94]
What the hell is the point of this, just to waist people's time?
5 0
3 years ago
_____________ consists of data that have been processed, organized, and put into context to be meaningful, and to convey underst
Lyrx [107]

Answer:Knowledge

Explanation: Knowledge is the collections of the facts , figure and related data in order to make context regarding any topic. The context of knowledge is organized and formatted in such a manner which can be understood and learnt by the individuals.It is based on the theory or any practical incident to describe the information about it.

E.g.- the remembering of any particular historic incident.

4 0
4 years ago
A server core installation can't be converted to a minimal server interface.
11Alexandr11 [23.1K]
True.... ca i have brainliest?
3 0
3 years ago
Which of the following devices is a simple machine
hram777 [196]

Answer:

what are the machines?

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • In a class hierarchy,
    15·1 answer
  • What item on a business card is generally the most prominent?
    10·2 answers
  • Electricity was seen as a mysterious force and began to creat a stir when people called​
    13·1 answer
  • In which phase of the design process does the developer establish the project goals? A. Design B. Planning C. Development D. Lea
    15·2 answers
  • What is the exposition of the movie inside out
    13·2 answers
  • ________ is a publicly accessible website that allows users to add and edit interlinked web pages and make contributions from th
    8·2 answers
  • What solicits online input such as product ratings from consumers?
    7·1 answer
  • How to do or create a shepard tone using additive synthesis in Pure Data. Please help, desperate!!
    8·1 answer
  • Which of the following occupations uses math concepts to determine if a particular event would occur and the related costs of th
    14·1 answer
  • What is live ware in relation to computer​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!