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
Which of these is an example of rebranding ?
suter [353]
What are the options
7 0
4 years ago
Read 2 more answers
Which is the best software application to be used by a hotel manager​
cluponka [151]

Answer:

Cloudbeds

:))

hope it helps

5 0
3 years ago
Is there any app that understands fake photos<br><br><br>help me i need to know it​
Lapatulllka [165]

Answer:

Tineye Image Recognition. This app allows users to upload a picture or a URL to trace where else it appears online. ...

Reversee. This app stays true to its name. ...

Camfind. ...

Reverse Image Search.

7 0
3 years ago
Read 2 more answers
Software intended to damage computer systems.
DIA [1.3K]

Explanation:

id 6488886211

pass 9999

7 0
3 years ago
Read 2 more answers
Can someone help me with these questions on linear dimensions pls
andrew-mc [135]
Size dimentions reffer to overall dimentions and will tell the overall width, lenth height and depth of something location dimentions means the locatuon of each geometric shape.
7 0
3 years ago
Read 2 more answers
Other questions:
  • Which sign or symbol will you use to lock cells for absolute cell reference?
    8·2 answers
  • A receiver requires 10nW as input power. If all the system losses add up to 50dB, then how much power is required from the sourc
    15·1 answer
  • As referenced in this Canvas guide (Links to an external site.), Canvas is best viewed at a minimum of 800x600 pixels, which is
    5·1 answer
  • Which of the following software is unique to a Mac?
    15·2 answers
  • What is the biggest type of gear?<br><br>A. Spur<br>B.Worm<br>C.Wheel<br>D.Pinion
    6·2 answers
  • Extending the web server functionality implies that the web server and the web-to-database middleware will properly communicate
    10·1 answer
  • Describe practices that enable software designers to think about using patterns?
    10·1 answer
  • Which statement best compares routers and hubs?
    9·1 answer
  • Which of the following statements about federal student loans is true?
    7·1 answer
  • It is used to show the program and files that are open.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!