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 06:20, Masielovebug
In what kind of attack can attackers make use of millions of computers under their control in an attack against a single server or network availability confidentiality integrity identity automated attack software? those who wrongfully disclose individually identifiable health information can be fined up to what amount per calendar year? single most expensive malicious attack hipaa what are script kiddies? advanced persistent threat security manager security engineer what level of security access should a computer user have to do their job what process describes using technology as a basis for controlling the access and usage of sensitive data? cybercriminal
Answers: 1
image
Computers and Technology, 22.06.2019 19:20, manny2085
Amedian in the road will be marked with a white sign that has a black arrow going to the left of the median. true false
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, gabby640
Name the range function that would generate the following list of integers values: 0,1,2,3,4,5.
Answers: 1
image
Computers and Technology, 23.06.2019 15:30, taapeters
Brian wants to conduct an online search with a certain phrase. he intends to use the words books that belong to the 1800s in his search. how should he use the word that in his search?
Answers: 1
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:

Konu
Mathematics, 26.10.2020 05:30
Konu
Mathematics, 26.10.2020 05:30
Konu
Mathematics, 26.10.2020 05:40