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
fgiga [73]
1 year ago
9

write a for loop to populate array userguesses with num guesses integers. read integers using scanf. ex: if num guesses is 3 and

user enters 9 5 2, then userguesses is {9, 5, 2}.
Computers and Technology
1 answer:
snow_lady [41]1 year ago
3 0

 #include <iostream>

 

  #include <vector>

 

  using namespace std;

 

 

  int main() {

   const int NUM_GUESSES = 3;

   vector<int> userGuesses(NUM_GUESSES);

   unsigned int i;

    /* Your solution goes here  */

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

      cout << "Enter number " << i << ": ";

      cin >> userGuesses.at(i);

    }

 

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

 

       cout << userGuesses.at(i) << " ";

 

    }

 

    return 0;

 

 }

While a given condition is true, an action is repeated in a for loop. When the condition ultimately evaluates to false, the action is stopped from being repeated. The for loop in JavaScript resembles the for loop in C and Java fairly closely. The most fundamental for loops in JavaScript have the appearance. The for keyword is used at the beginning of this kind of loop, followed by a series of parentheses. They each contain three optional expression statements that are separated by a semicolon,;. The code block statement that needs to be executed is enclosed by a set of curly brackets, or.

Learn more about  Java script here:

brainly.com/question/27683282

#SPJ4

You might be interested in
A _______ is a computer running software that allows it to share resources over a network. it may share programs or data. select
prohojiy [21]
A _______ is a computer running software that allows it to share resources over a network. it may share programs or data.

C. Server
5 0
3 years ago
.Choose the extention of Scratch Project<br><br><br> .sb2<br><br> jpeg<br><br> .exls
Ratling [72]

Answer:

I know about .sb3, and it similar to .sb2

that might be your answer.

Explanation:

jpeg is for pictures and .exls is Microsoft's excel

extension.

4 0
3 years ago
Read 2 more answers
What is qwerty and why is it on the keyboard?
Genrish500 [490]

Answer:

qwerty is the main way people sort out there keyboard as you can see on the left side of the keyboard there is W,A,S,D

Explanation:

6 0
4 years ago
Read 2 more answers
Clunker Motors Inc. is recalling all vehicles from model years 1995-1998 and 2004-2006. A boolean variable named recalled has be
fenix001 [56]

Answer:

lknjokjbhib

Explanation:

jjbnikjjk jk  

8 0
3 years ago
A function may return a pointer, but the programmer must ensure that the pointer:
elena-14-01-66 [18.8K]
Hello i am kust gere to answer the qustions nothing else
4 0
4 years ago
Other questions:
  • Compare and contrast how the roles of women and men in society are changing​
    14·1 answer
  • Which one of the following oscilloscope controls is used to move the trace up and down the screen vertically? A. Focus B. Sweep
    9·2 answers
  • What type of cable is used to connect a workstation serial port to a cisco router console port?
    15·1 answer
  • What adds the element carbon to the environment
    10·2 answers
  • Which of the following is the most significant outcome of the formation of the SMPTE?
    6·2 answers
  • What do you do when you have computer problems? Check all that apply. PLEASE HELP
    9·2 answers
  • Why did they meet their friend<br><br><br><br><br><br><br><br>​
    8·2 answers
  • NEXT
    15·2 answers
  • Who used the term" software" first?
    8·2 answers
  • (2) Design a program to determine if a student is entitled to an incentive granted upon payment of
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!