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
when a user has the requirement to stay connected 100% of the time as they move throughout the WLAN coverage area, what are they
zimovet [89]
They are concerned about many things
5 0
3 years ago
Which of the following best explains the different between Cut and Copy? a. When you copy text you are permanently deleting it,
Vilka [71]
B. When you copy text it remains in its original location and places it on the clipboard. Cutting text removes it from its original location and places it on the clipboard

5 0
2 years ago
Read 2 more answers
Write the contributions of dr herman hollerith​
Ad libitum [116K]

He invented the tabulating machine. In 1890 U.S

5 0
3 years ago
Write the following program in C++ to print:
Alenkinab [10]
1.
#include <iostream>#include <string>
using namespace std;
int main(){    string chars; // This is where we will put our @ signs and print them    for(int x=0;x < 5; x++){
        chars = chars + '@'; // This will concatenate an @ sign at the end of the variable        cout << chars << "\n";    }}

2.
#include <iostream>#include <string>
using namespace std;
int main(){    string name; // Our variable to store the name    cout << "What is your name? \n"; // Asks the user for their name    cin >> name;    cout << "\nWell, hello " << name << "!";}

3.
#include <iostream>#include <string>
using namespace std;
int main(){    int number; // Our variable    cout << "Enter a number\n"; // Asks for a number    cin >> number;    cout << "You entered " << number << "%!";}

4.
#include <iostream>#include <string>
using namespace std;
int main(){    int number; // Our variable    cout << "Enter a number\n";    cin >> number;
    int check = number % 2; // The modulo operator (the percent sign) gets the remainder of the quotient    if (check == 0) {        cout << number << " is even!"; // If the remainder is 0 then it prints out "x is even"    } else {        cout << number << " is odd!"; // If the remainder is not 0 then it prints out "x is odd"    }}

5.
#include <iostream>#include <string>
using namespace std;
int main(){    float r; // Our variable    cout << "Enter a radius\n";    cin >> r;    if (r < 0){        cout << "Lol. No."; // If the radius is less than zero print out that message    }    float circumference=2*3.14*r;    float area=r*r*3.14;    cout << "\n\n Circumference of circle: " << circumference;    cout << "\n Area of circle: " << area;}
4 0
3 years ago
An isp is a group of updates, patches, and fixes that apply to specific oss.
olasank [31]
<span>The statement that an ISP is a group of updates, patches, and fixes that apply to specific OSs is false.
</span> ISP stands for Internet service provider, while OSS stands for Operations support system.<span> The term ISP denotes a company or</span><span> organization that provides services for accessing, using, or participating in the Internet. OSS on the other hand is used by the providers to manage their networks.
</span>
4 0
2 years ago
Other questions:
  • What can help you best learn about appearance, habitats and behaviors of birds in your area
    9·1 answer
  • the majority of refrigeration systems in residential comfort cooling systems use what type of system?
    13·1 answer
  • WHAT IS A COMPUTER ????
    14·2 answers
  • How might a company go about performing a load test on their website?
    7·1 answer
  • Jenis jenis perangkat keras?
    14·1 answer
  • The Operating System is used to locate, move, and copy files.
    10·1 answer
  • What is the Is option that prints the author of a file​
    7·1 answer
  • Tips for staying safe using social media. Using in your own words.
    6·1 answer
  • Can someone reply me
    11·1 answer
  • A network of computers that provides access to information on the web.
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!