subject

C++ question (if and while loops)for some reason it is closing whenever i go through the first statement completely or in the while loop if something is to happen if it is 0. i want it to display the pay message in both instances. however it crashes. #include using namespace std; int main() { double wage; double hours; double tr; cout < < "enter the wage for the employee" < < endl; cin > > wage; if (wage > = 0.00001) { cout < < "you have entered " < < wage < < " as a value" < < endl; cout < < " enter the amount of hours the employee worked." < < endl; cin > > hours; cout < < "you have entered " < < hours < < "hours." < < endl; cout < < " enter the tax rate as a decimal." < < endl; cin > > tr; std: : cout < < "the employee's pay for this cycle is " < < (wage * hours) - (wage * tr) < < endl; } while (wage = 0) { cout < < " reenter, you need to specify amount greater than 0.00." < < endl; if (wage > = 0.00001) { cout < < "you have entered " < < wage < < " as a value" < < endl; cout < < " enter the amount of hours the employee worked." < < endl; cin > > hours; cout < < "you have entered " < < hours < < "hours." < < endl; cout < < " enter the tax rate." < < endl; cin > > tr; std: : cout < < "the employee's pay for this cycle is " < < (wage * hours) - (wage * tr) < < endl; } } return 0; }

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:30
Technician a says that a dry sump system uses no oil storage sump under the engine. technician b says that a wet sump system uses no oil storage sump under the engine. who is correct?
Answers: 3
question
Computers and Technology, 22.06.2019 22:30
Alex’s family members live in different parts of the world. they would like to discuss the wedding plans of one of their distant relatives. however, alex wants all the family members to talk to each other simultaneously so that they can make decisions quickly. which mode of internet communication should they use? a. blog b. email c. wiki d. message board e. instant messaging
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
question
Computers and Technology, 23.06.2019 11:30
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
You know the right answer?
C++ question (if and while loops)for some reason it is closing whenever i go through the first state...
Questions
question
Mathematics, 26.01.2021 02:20
question
Mathematics, 26.01.2021 02:20
question
Mathematics, 26.01.2021 02:20
question
Mathematics, 26.01.2021 02:20
question
Mathematics, 26.01.2021 02:20
Questions on the website: 13722359