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
emmainna [20.7K]
3 years ago
7

C++ Question (if and while loops)

Computers and Technology
1 answer:
IceJOKER [234]3 years ago
8 0
Your while statement is in error

<span>while (wage = 0) assigns 0 to wage.

What you want is to compare wage to 0, ie.:

while (wage == 0).

However, comparing double's to some value is very bad practice due to rounding errors. Much safer is to always have a < or > in there:

while (wage < 0.0001)

If you confuse assignment (=) and comparison (==) often, and you don't have a compiler to warn you for this, you can adopt the coding style to put the constant first:

while(0 == x)</span>
You might be interested in
Where does the CPU store its computations
mario62 [17]

Answer:

In main memory

Explanation:

Hope this helps

8 0
3 years ago
Read 2 more answers
Charles sends Julia text messages every morning insulting her appearance and threatening to hurt her. He writes unflattering des
aalyn [17]
What is the question?
4 0
3 years ago
Read 2 more answers
Critical thinking questions
Scrat [10]

Answer:

1: A loop will continue running until the defined condition returns false . ... You can type js for , js while or js do while to get more info on any of these. ... initialization - Run before the first execution on the loop. ... But it can be used to decrement a counter too.

2: The loop increments the value of new while the loop condition is true. The end value of new is 3.

3: We could use some sort of finger recognition or face so they don’t have to type in their password.

4: give them a second chance for their date of birth.

5: sum = 0 must be before for loop. If inside for loop, it will keep resetting sum to 0 each iteration.

Explanation:

8 0
2 years ago
The short-range two-way communication technology behind contactless payments is called ____.
sasho [114]
Near field communication
4 0
2 years ago
What are two examples of events in the Outlook Calendar?
Natalka [10]
One hour meetings with coworkers and all day workshops.
6 0
3 years ago
Read 2 more answers
Other questions:
  • If you were to conduct an Internet search on vegetarian restaurants, which of the following searches would be the best
    7·1 answer
  • If the pc­doctor software is installed on a computer's hard drive, what two different ways can the program be started?
    7·1 answer
  • You have been allocated a class C network address of 211.1.1.0 and are using the default subnet mask of 255.255.255.0 how many h
    14·1 answer
  • Read the paragraph.
    12·2 answers
  • Your company is instituting a new security awareness program. You are responsible for educating end users on a variety of threat
    10·1 answer
  • Why is the radial gradient type a good choice for the grapes?
    13·2 answers
  • In mathematics, "quadrant I" of the cartesian plane is the part of the plane where x and y are both positive. Given a variable,
    11·1 answer
  • Sometimes a database can contain "bad data," meaning incomplete, incorrect, inaccurate, or irrelevant records, which can be corr
    7·1 answer
  • Describe the components of the Web. Your friend wants to create and publish a Web page. He tells you that he wants to learn the
    9·1 answer
  • What is presentation
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!