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
14

.3.3: Populating a vector with a for loop. Write a for loop to populate vector userGuesses with NUM_GUESSES integers. Read integ

ers using cin. Ex: If NUM_GUESSES is 3 and user enters 9 5 2, then userGuesses is {9, 5, 2}
Physics
1 answer:
Reptile [31]3 years ago
8 0

Answer:

#include <iostream>

#include <vector>

using namespace std;

int main() {

  const int NUM_GUESSES = 3;

  vector<int> userGuesses(NUM_GUESSES);

  int i = 0;

int uGuess = 0;

for(i = 0; i <= userGuesses.size() - 1; i++){

 cin >> uGuess;

 userGuesses.at(i) = uGuess;

}

cout << endl;

  return 0;

}

Explanation:

First inbuilt library were imported. Then inside the main( ) function, 3 was assigned to NUM_GUESSES meaning the user is to guess 3 numbers. Next, a vector was defined with a size of NUM_GUESSES.

Then a for-loop is use to receive user guess via cin and each guess is assigned to the vector.

You might be interested in
Radio waves and microwaves are similar because they both have
tekilochka [14]

The correct answer is

b. low frequencies and low energy.

In fact, microwaves and radio waves have frequency up to 10^{10}-10^{11} Hz, which are really low compared, for instance, to the frequency of gamma rays (10^{20} Hz). Moreover, the energy of an electromagnetic wave is directly proportional to its frequency:

E=hf

where h is the Planck constant and f the frequency; therefore, low frequency means also low energy.

4 0
3 years ago
The energy of motion or the energy an object has as a result of its<br> motion.
nirvana33 [79]

Answer:

Kinetic energy is what i think the answer is

Explanation:

I also looked it up

8 0
3 years ago
What do you mean by force?​
salantis [7]
It’s to push an object in it’s direction of where it’s leading to.
3 0
3 years ago
8. The moon has about 1/6th the gravity of the Earth. How would the potential energy of an object be different on the moon if it
topjm [15]

The potential energy on the moon would be 1/6 of the potential energy on Earth

Explanation:

The potential energy of an object is the energy possessed by the object due to its position in a gravitational field, and it is given by

PE=mgh

where

m is the mass of the object

g is the strength of the gravitational field

h is the height of the object above the ground

In this problem, the potential energy of the object on the Earth is

PE=mgh

On the Moon, the gravity is

g'=\frac{1}{6}g

Therefore, if the same object (same mass) is placed at the same height h on the Moon, its potential energy would be

PE' = m(\frac{1}{6}g)h = \frac{1}{6}(mgh) = \frac{1}{6}PE'

Learn more about potential energy:

brainly.com/question/1198647

brainly.com/question/10770261

#LearnwithBrainly

7 0
3 years ago
How do you think the temperature difference between the beakers relates to the rate of heat transfer?
Bogdan [553]

Answer and Explanation:

The rate (in W) at which heat energy moves from the more blazing article to the colder item increments with the temperature distinction between the items.  

The more noteworthy the temperature contrast, the more prominent the rate at which exchange of heat energy takes place.

Thus the temperature difference between the beakers relates in the same manner as described above.

The exchange of heat energy continues until a thermal equilibrium is attained.

8 0
3 years ago
Other questions:
  • Is 0.005 a significant number
    6·2 answers
  • PLEASE HELP!!!!!! WILL GIVE BRAINLIEST TO WHOEVER ANSWERS WITH THE RIGHT ANSWER !!!!!!!! 
    6·2 answers
  • Helpppp!!!
    9·1 answer
  • What kind of weather would an anticyclone likely bring? a. stormy c. dry and clear b. cool and wet d. changeable
    12·2 answers
  • You are in an elevator that is accelerating you upward at 4.55 m/s^2. How much time does it take you to reach a speed of 11.0 m/
    5·1 answer
  • A particle whose speed is 50 m/s moves along the line from A(2,1) to B(9,25). Find its velocity vector in the form of ai +bj.
    8·1 answer
  • The inside of a race car often looks very different from the inside of a normal car. Race car teams often remove seats and other
    13·1 answer
  • A 56 kg boat that is 7.6 m in length is initially 7.6 m from the pier. A 39 kg child stands at the end of the boat closest to th
    13·1 answer
  • What is tyndall effect​
    11·2 answers
  • An eleven quart container of ice cream is to be made in the form of a cube. calculate the length of a side of the cube. 1 gallon
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!