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
Is it true that if the user log out the computer will turn off automatically​
sergiy2304 [10]
Yes that is a true statement
8 0
2 years ago
Read 2 more answers
If we assume the modern view of existential import, why is the following syllogism invalid? No computer is made of clay. All com
Papessa [141]

Answer:

<u>because the conclusion is not in agreement with the two premises.</u>

Explanation:

<em>Remember</em>, the term<u> syllogism</u> refers to the form of reasoning that draws its conclusion based on the stated premises. In other words, a conclusion is reached if it satisfies <em>all or part </em>of the premises.

In this case, the statement "No computer is made of clay" and  "All computers are electronic devices" should be inferred to mean, <em><u>No </u></em><em>electronic devices are made of clay" </em>not<em> </em><em>"Some electronic devices are not made of clay," </em>since the two premises neither suggest that electronic devices are made from clay.

5 0
2 years ago
What is the term for the era created by the digital revolution?
ollegr [7]
We are in the modern era and the information era
8 0
2 years ago
?an ip address reservation is made by creating an association between an ip address and what type of client identifier?
victus00 [196]
The ethernet address, a.k.a. mac address. That way, a DHCP server can give the same IP address to a returning client.
3 0
3 years ago
The internet is ________. an internal communication system for businesses a large network of networks a communication system for
uranmaximum [27]

A large network of networks

<h3>What Is a large network?</h3>
  • It is the biggest network that connects computers across the world. With the internet, people can share data and files over the internet. The Internet is defined as a network of networks Hence it is the correct option

To learn more about the network, refer

to https://brainly.in/question/32165678

#SPJ4

4 0
1 year ago
Other questions:
  • Susan bought a new sweater on sale for $28.93.she was charged HST of 13%.find the total amount of her bill including taxes.​
    9·1 answer
  • A superscope is a special type of scope that allows a dhcp server to service multiple ipv4 subnets on multiple physical networks
    7·1 answer
  • What are three reasons teens might start drinking alcohol??
    7·2 answers
  • Program Rock.java contains a skeleton for the game Rock, Paper, Scissors. Open it and save it to your directory. Add statements
    10·1 answer
  • Which of the following is NOT a component of a DFD?
    8·1 answer
  • True or false.local and cloud backup differs in where the backup is saved
    15·2 answers
  • How many ways do advertisers determine target audiences ??????
    15·1 answer
  • Who is your favorite smite god in Hi-Rez’s “Smite”
    14·1 answer
  • Write a method doubleUp that doubles the size of a list of integers by doubling-up each element in the list. Assume there's enou
    13·1 answer
  • Assume that x and y are boolean variables and have been properly initialized. !(x || y) || (x || y) The result of evaluating the
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!