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]
4 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]4 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
What is thhe name of service included with windows server operating systemthat manages a centralized database containing user ac
kogti [31]

Answer:

The active directory (AD)

Explanation:

Included in the operating system of Windows server is a primary feature called Active Directory which essentially manages a centralized database containing user account and security information such as password.

The AD is created by Microsoft and allows users (typically admins) to manage network and IT resources and application data of a system running the Windows operating system. AD can be used to create users, authenticate users and authorize users to be able to access servers and applications on the system.

4 0
3 years ago
Technology can cause a drop in input costs.<br> a. True<br> b. False
Marizza181 [45]
<span>True that technology can cause a drop in input cost. In a production process, there are three kinds of cost that called input cost, which are the direct material cost, direct labor cost, and overhead cost. Technology usage can make the production process more efficient by reducing labors included in the process. This condition leads to a cost reduction.</span>
6 0
3 years ago
Read 2 more answers
The concept of "plug and play" is demonstrated by which of the following<br> scenarios?
bagirrra123 [75]

Answer:

Farah has completed a post-secondary education program and is now ready to begin working, without additional training, on her first day .

Explanation:  HoPe ThIs HeLpS

6 0
3 years ago
Describe the information technology industry today
Volgvan

Answer:

The information technology (IT) sector includes companies that produce software, hardware, or semiconductor equipment, and companies that provide internet or related services.

Explanation:

6 0
2 years ago
What type of device is the printer?
ICE Princess25 [194]

B,the printer only receives signals from the computer and prints them.

4 0
4 years ago
Read 2 more answers
Other questions:
  • 11. Print Layout, Full Screen Reading, Web Layout, Outline and Draft are examples of _______. 12. What do you do if the spelling
    5·1 answer
  • Explain the computer according to size​
    10·1 answer
  • A good CRM should Integrate marketing, sales, and customer support activities measuring and evaluating the process of knowledge
    13·1 answer
  • Do you think lossy compression formats will be popular in 20 years? Why or why not?
    10·1 answer
  • A student will not be allowed to sit in exam if his/her attendance is less than 75% .
    8·1 answer
  • Anyone trying to play fortnite ? im bored lol
    6·2 answers
  • To excel at these professions, you need to be able to combine an eye for elegant design with a mind that delights in efficient o
    8·1 answer
  • Join each of the follwing sentences using unless
    14·2 answers
  • List any three positive impact of a computer​
    9·1 answer
  • Provide the user with a menu for the following 10 algorithms. Then ask which algorithm the user decides she/he wants to use. Fin
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!