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
Nataly_w [17]
3 years ago
13

What error occurs in the following program? #include using namespace std; int main() { int number1, number2, sum; cout <<

"Enter number 1:"; cin >> number1; cout << "Enter number 2:"; cin >> number2; number1 + number2 = sum; cout << "The sum of number 1 and number 2 is " << sum; return 0; }
Computers and Technology
1 answer:
Nady [450]3 years ago
7 0

Answer:

1. ‘cout’ was not declared in this scope.

2. ‘cin’ was not declared in this scope.

3. lvalue required as left operand of assignment.

Explanation:

The code gives the error cout and cin was not declare. This error means, we not include the library where they define.

cout and cin is the input/output instruction and they include in the library iostream file.

the last error is lvalue required as left operand of assignment.

lvalue means the assignable value, we actually do the wrong assignment.

number1 + number2 = sum;

here, sum is is the assignment variable. so, it must be in the right side of the '=' operator.

sum = number1 + number2 ;

Now, the above is correct. the value number1 plus number2 is assign to sum.

You might be interested in
A file name extension provides what information about a file?
ASHA 777 [7]
In a file extension, it tells what type of file it is and tells what compiler to run the code.
8 0
3 years ago
Read 2 more answers
Which key do programmers use to end running programs?
Aleksandr [31]
<span>Pause/Break   i would say</span>
3 0
3 years ago
Read 2 more answers
Type the correct answer in the box. Spell all words correctly. Joseph is a digital media developer and has years of work experie
Damm [24]

It is better to develop soft skills. Irrespective of profession, soft skill is a common skill which is required to be present in everyone to move along with others and continue the work successfully. A person who is good at technical need soft skill to work in collaboration with others, manage team, solve problems, etc.

So there are separate soft skill training provided for various roles and years of experience. So, I suggest to have soft skill training and do additionally MBA degree.

5 0
4 years ago
What kind of software would you recommend a company use if its employees are receiving e-mails that are potentially hazardous ?
scZoUnD [109]

Answer:

Microsoft project

Explanation:

I'm smart

6 0
3 years ago
The term ____ refers to the use of a single unifying device that handles media, internet, entertainment, and telephone needs.Dig
Genrish500 [490]

Answer:

The answer IS digital convergence.

Explanation:

6 0
1 year ago
Other questions:
  • How do you determine latitude using an astrolabe?
    11·1 answer
  • Where is NumPy used?
    6·2 answers
  • Bobbi owns a protein shake company, which has been trading for 3 years. Her products are stocked in a number of gyms, but the co
    11·1 answer
  • What was the first 1.0.1 version of openssl that was not vulnerable to heartbleed?
    5·2 answers
  • What will you better be prepared for by learning about the animals you photograph
    11·1 answer
  • Travis just got promoted to network administrator after the previous administrator left rather abruptly. There are three new hir
    14·1 answer
  • Is Filmora 9 or Final Cut Pro Better for personal use?
    12·1 answer
  • Drag each label to the correct location on the image. Match the movie qualities with the right period of movies.
    8·1 answer
  • Write its features:features of computer ​
    15·1 answer
  • (Just wondering and for fun) What can humanity do to survive after the universe dies? Assuming we have advanced tech and there a
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!