Computers and Technology

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; }

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:30, robert7248
You have a large, late-model pick-up truck with a rear seat. the pick-up truck weighs 6,500 pounds. the florida seat belt law
Answers: 1
image
Computers and Technology, 23.06.2019 07:30, barkonatree
What is the penalty for violating section 1201 of title 17 chapter 21 of the us code
Answers: 1
image
Computers and Technology, 24.06.2019 13:30, elviaortiz402373
Which of the following is not a “fatal four” event?
Answers: 2
image
Computers and Technology, 25.06.2019 05:00, quintinlarrieu
Brad wants to buy flowers for his friend with 33 dollars. the daisies are 1 dollar each and the roses are 2 dollars each he buy 3 more daisies than roses how much did the roses cost
Answers: 2
Do you know the correct answer?
C++ question (if and while loops)for some reason it is closing whenever i go through the first state...

Questions in other subjects: