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
leonid [27]
3 years ago
5

What is wrong with the following C++ code? How would you fix it? int sum; for (int i=0; i<1000; ++i) sum += i; { printf("Sum

of 0 to 999 is %d\n", sum);
Computers and Technology
1 answer:
enyata [817]3 years ago
4 0

Answer:

Correct code is:

int sum;

  for (int i=0; i<1000; ++i)

  sum += i;

      printf("Sum of 0 to 999 is %d\n", sum);

Explanation:

In the problem code there is a open curly open bracket after the sum+=1;.

This open bracket will give an To fix this code, we remove this bracket from  the given code.Then this code will calculate sum of all number from 0 to 999.And the last line of the code will print the sum.

You might be interested in
How long before a speech should you begin practicing?
hichkok12 [17]

Answer:

D

Explanation:

4 0
3 years ago
Read 2 more answers
In the event of a network attack or intrusion, a _____ lists the tasks that must be performed by the organization to restore dam
dexar [7]

Answer:

The answer is "Recovery Plan for Disasters".

Explanation:

In the given statement, some of the information is missing, which can be described as follows:

A) systems engineering plan

B) security compliance plan

C) risk assessment plan

D) Recovery Plan for Disasters

It is a set of guidelines for the execution of a recovery process, it provides the restoration and safety to the system for the organization in the event of a disaster. It defined as "a detailed summary of the appropriate acts to be carried out before, during and after a disaster", and incorrect choices were explained as follows:

  • In option A, It is used to design and analyze complex systems.
  • In option B, It provides frameworks for the corporate evaluation process.
  • In option C, It is used to identify the problems.
6 0
3 years ago
To create a formula in______, you would first click in one of the cells​
Pavlova-9 [17]

Answer:excel

Explanation:

5 0
3 years ago
Read 2 more answers
3. The Central Processing Unit is made of
monitta

Answer:

a

Explanation:

jjwjwjwwjwjwjwjwjwj#k#kwkekee

4 0
2 years ago
If you see a diamond-shaped sign, it will be what type of sign?
Setler [38]
They are warning signs .
8 0
3 years ago
Read 2 more answers
Other questions:
  • To join two or more objects to make a larger whole is to _____________ them.
    8·2 answers
  • How to use translate on a website?
    15·1 answer
  • which telecommunications service allows internet and telephone service to work over the same phone line
    13·1 answer
  • Using python:
    10·1 answer
  • Leah wants to add an image to her updated presentation, so she wants to access the Help interface. What should
    11·2 answers
  • Q. Which protocol would best serve to authorize users to access directory services?
    8·1 answer
  • You can invoke or call a method from another program or method. When methods must share data, you can pass the data into and ret
    6·1 answer
  • I have a Dell laptop and last night it said that it needed to repair it self and asked me to restart it. So I did but every time
    11·1 answer
  • Which IDEs support multiple high-level programming languages? Select all that apply.
    14·2 answers
  • C program how to input this? ​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!