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
In round-robin scheduling,a) the time quantum should be larger than the context switch time. b) the time quantum should be as sm
pickupchik [31]

Answer: d. the time quantum should be as small as possible.

Explanation: Round robin is a CPU scheduling algorithm. If the time quantum is extremely small, number of context switches is very high, round robin scheduling will be same as processor sharing algorithm. Then the algorithm is good. Very large time quantum will make response time of processes too much which may not be tolerated in interactive environment.

3 0
3 years ago
Tim is in charge of the upcoming interschool baketball tournamnent. He wants to arrange all of the teams and their members in al
zalisa [80]
I think the answer is C.
7 0
3 years ago
How can an antivirus protect your device​
Igoryamba
Antivirus software protects your device from viruses that can destroy your data, slow down or crash your device, or allow spammers to send email through your account. Antivirus protection scans your files and your incoming email for viruses, and then deletes anything malicious
3 0
2 years ago
Read 2 more answers
Hexadecimal (19BACDFE)H into Octal. Please write step by step.
lubasha [3.4K]
The H idk, but till E is i think 3156546776
4 0
4 years ago
HELP is web designing a career in graphic design yes or no?
Ilya [14]

Answer:

Web Design, just like Graphic Design, is the creation of graphics, typography, graphs, and images to communicate an idea. However, Web Design only concerns websites, not print. ... They also have to take their designs and turn them into a working website, which involves programming.

Explanation:

In other words no

6 0
3 years ago
Other questions:
  • Which element in Access is an ideal data source?
    12·2 answers
  • You have just used a command that produced some interesting output on the screen. You would like to save that information into a
    10·1 answer
  • PLEASE HELP!!!!!!!!!!!
    15·2 answers
  • Task1: #Define a function called show_students which takes 2 parameters students and message #Print out a message, and then the
    14·1 answer
  • Why is it so important to adhere to principles that have been put forth by reputable organizations to ensure that you are mainta
    10·1 answer
  • What would your leadership style be?
    14·1 answer
  • Selection Sort List the resulting array after each iteration of the outer loop of the selection sort algorithm. Indicate the num
    10·1 answer
  • A retailer is able to track which products draw the most attention from its customers through the use of 5g-enabled motion senso
    5·1 answer
  • Question:
    6·2 answers
  • Write an algorithm to print the odd number from 100 to 1​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!