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
kramer
3 years ago
13

Int[] numList = {2,3,4,5,6,7,9,11,12,13,14,15,16}; int count=0; for(int spot=0; spot

Physics
1 answer:
pickupchik [31]3 years ago
4 0

Hi, there is not much information about what do you need to do, but base on the C++ code you need to complete it to count the number of items in the array, using the instructions already written.

Answer:

#include <iostream>

using namespace std;

int main()

{

   int numList [] = {2,3,4,5,6,7,9,11,12,13,14,15,16};

   int count=0;

   for(int spot=0; spot < (sizeof(numList)/sizeof( numList[ 0 ])); ++spot)

   {

        cout << numList[spot];

        cout << "\n";

        ++count;

   }

   cout << "The number of items in the array is: ";

   cout << count;

   return 0;

}

Explanation:

To complete the program we need to finish the for statement, we want to know the number of items, we can get it by using this expression:  (sizeof(numList)/sizeof( numList[ 0 ])), sizeof() function returns the number of bytes occupied by an  array, therefore, the division between the number of bytes occupied for all the array (sizeof(numList)) by the number of bytes occupied for one item of the array (sizeof( numList[ 0])) equal the length of the array. While iterating for the array we are increasing the variable count that at the end contains the result that we print using the expression cout << "The number of items in the array is: "

You might be interested in
Which type of wave is described as a wave that is not confined to the space along medium?
Dmitry [639]

Traveling wave is a wave that is not confined to the space along medium.

traveling wave is a wave that travels along the medium causing disturbance. instead of vibrating at the same place, the particles actually move in the direction of wave. one common example of such type of wave is ocean waves.

4 0
4 years ago
Read 2 more answers
How much work is done when a 4.0-newton box is carried horizontally a distance of 2.0 meters at a constant velocity?
monitta

Answer: Work done by the box will be 8 Joules.

Explanation:

Work done by a substance is the product of the force applied on it and the displacement of a substance.

Mathematically,

W=F.s

Where,

W = work done = ? J

F = Force applied = 4 N

s = displacement = 2 m

Putting values in above equation, we get:

W=4N\times 2m=8Nm=8J

Hence, work done by the box will be 8 Joules.

4 0
3 years ago
Read 2 more answers
Nuclear sizes are expressed in a unit named<br><br> Magnetism at the centre of a bar magnet is
Illusion [34]
Nuclear size are measured in a unit called fermi
Magnetism at the centre of a bar magnet is zero, because there is no magnetism at all in the centre
Hope this helps :) 
3 0
4 years ago
Read 2 more answers
PLS HELP I WILL GIVE BRAINLIEST TO FIRST ANSWER
Gekata [30.6K]

Answer:Earth is a truly unique in its abundance of water. Water is necessary to sustaining life on Earth, and helps tie together the Earth's lands, oceans, and atmosphere into an integrated system. Precipitation, evaporation, freezing and melting and condensation are all part of the hydrological cycle - a never-ending global process of water circulation from clouds to land, to the ocean, and back to the clouds. This cycling of water is intimately linked with energy exchanges among the atmosphere, ocean, and land that determine the Earth's climate and cause much of natural climate variability. The impacts of climate change and variability on the quality of human life occur primarily through changes in the water cycle. As stated in the National Research Council's report on Research Pathways for the Next Decade (NRC, 1999): "Water is at the heart of both the causes and effects of climate change."

Hope this is helpfull

Explanation:

Just so everyone knows HEY PLS DON'T JOIN THE ZOOM CALL OF A PERSON whose ID IS 825 338 1513 (i'm NOT SAYING THE PASSWORD) HE IS A CHILD PREDATOR AND A PERV. HE HAS LOTS OF ACCOUNTS ON BRAINLY BUT HIS ZOOM NAME IS MYSTERIOUS MEN. HE ASKS FOR GIRLS TO SHOW THEIR BODIES AND -------- PLEASE REPORT HIM IF YOU SEE A QUESTION LIKE THAT. WE NEED TO TAKE HIM DOWN!!! PLS COPY AND PASTE THIS TO OTHER COMMENT SECTIONS TO SPREAD THE WORD.

8 0
3 years ago
Part 1: Use complete sentences to explain why solar winds occur. Part 2: Give two examples in which solar winds impact Earth.
Troyanec [42]

Part 1

When the solar atmosphere accumulates a lot of magnetic energy to a point that cannot accumulate more, all that magnetic energy is suddenly released, and with it, a lot of radiation. So much, that in fact it covers all of the electromagnetic spectrum; from radio waves to gamma rays. That burst of radiation is called a solar flare. In a single solar flare the amount of radiation released is millions of times greater than all the nuclear bombs in the face if the earth exploding together. Lucky for us, most of the high-energy radiation dissipates before reaching the Earth, and the radiation that do reach us, is deflected by the Earth’s magnetic field.

Part 2

1.  Not all the radiation of solar flares that reach the Earth is deflected by its magnetic field; some of them reach us and charges the upper atmosphere with ionized particles. Those particles react with the gases in the atmosphere and produce a light; that light is what we call Auroras borealis or southern nights; One the most beautiful natural spectacles in earth, who thought Auroras begin their lives as deadly solar flares.

2.  Solar flares contain a lot of high-energy radiation that is extremely dangerous for our electronic devices; when they reach the Earth, they can damage sensible electronics like satellites. A very powerful solar flare could even damage all the electronic devices on the surface of the Earth.

4 0
3 years ago
Other questions:
  • Like his parents, Thomas is short, stocky, and heavyset. Although he exercises regularly and eats a well-balanced meal, his body
    9·2 answers
  • How did Bourne believe that an object could be made to rise or sink at will?
    10·2 answers
  • The valence electrons of metals are weakly attracted to the parent nuclei, so the electrons break free and float. The moving ele
    6·2 answers
  • One complete wave passes a putrefying pile of poached pickerel in 0.50 seconds. The piled pickerel protrude 20 cm along the beac
    10·1 answer
  • Your uncle is in the below-deck galley of his boat while you are spear fishing in the water nearby. An errant spear makes a smal
    10·1 answer
  • A mass of 0.4 kg is dropped from rest in a medium offering a resistance of 0.2|v|, where is measured in meters per second. Accel
    12·1 answer
  • a meteoroid changed velocity from 1.0km/s to 1.8 km/s in 0.03 seconds. what is the acceleration of the meteoroid
    6·1 answer
  • HELP ASAPPPPPPP !!!!
    15·1 answer
  • What did Ernest Rutherford's experiment of a beam of alpha particles aimed
    10·1 answer
  • A 15.0kg block is dragged over a rough, horizontal surface by a 70.0-N force acting at 20.0 degrees above the horizontal. The bl
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!