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 the following is a strength of fiscal policy?
Fynjy0 [20]
The answer to your question is b crowding out effect
7 0
3 years ago
12While trying to solve a network issue, a technician made multiple changes to the current router configuration file. The change
AfilCa [17]

Answer:

Issue the reload command without saving the running configuration.

Explanation:

5 0
3 years ago
What does amelia heart and the wright brothers have in common
expeople1 [14]

Answer:

they are stepbro and step sis and they fucx

Explanation:

7 0
2 years ago
Which is a feature of audio editing software?
riadik2000 [5.3K]
D. It is used to add sound effects.
Hope this helps!
5 0
3 years ago
Read 2 more answers
The concept of algorithm ____, is one in which you can observe an algorithm being executed and watch as data values are dynamica
Yakvenalex [24]
The answer to this question would be algorithm animation.

Since the algorithm is animate, then you will be able to watch it works. Watching the algorithm executed can give you much information, what the algorithm does and how the algorithm does it.
Normally you will not be able to do this since the algorithm only do what it needs to do without reporting the detail to you
4 0
3 years ago
Other questions:
  • Describe the effect of a pull up resistor
    7·1 answer
  • Does any one play sniper clash 3d ??? ​
    9·2 answers
  • What is the difference between throughput and bandwidth?
    14·1 answer
  • Which of the following is used to describe an authentication scenario in which a user logs in using a PIN and a security token
    7·2 answers
  • When you make a DNS query, where does your computer first check to find an IP address to name mapping?
    8·1 answer
  • Haley is responsible for checking the web server utilization. Which things should she review while checking the server utilizati
    8·2 answers
  • ¿Quién recibe la orden de ejecución de un programa enviada por el usuario?
    9·1 answer
  • Enthusiasm codehs 7.6.4 Write a function called add_enthusiasm that takes a string and returns that string in all uppercase with
    15·1 answer
  • What is up what everbody up to
    13·2 answers
  • What are some limitations when it comes to testing and ensuring program quality? List at
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!