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
IrinaK [193]
3 years ago
9

Write a for loop to populate array userGuesses with NUM_GUESSES integers. Read integers using cin. Ex: If NUM_GUESSES is 3 and u

ser enters 9 5 2, then userGuesses is {9, 5, 2}. for C++
Computers and Technology
1 answer:
vlabodo [156]3 years ago
6 0

Answer:

Follows are the code to this question:

#include <iostream>//defining header file

using namespace std;

int main() //defining main method

{

const int NUM_GUESSES = 3;//defining an integer constant variable NUM_GUESSES

int userGuesses[NUM_GUESSES];//defining an array userGuesses

int i = 0;//defining integer variable i

for(i=0;i<NUM_GUESSES;i++)//defining for loop for input value

{

cin>>userGuesses[i];//input array from the user end  

}

for (i = 0; i < NUM_GUESSES; ++i)//defining for loop fore print value  

{

cout <<userGuesses[i] << " ";//print array value with a space

}

return 0;

}

Output:

9

5

2

9 5 2  

Explanation:

In the above-given program, an integer constant variable NUM_GUESSES is defined that holds an integer value, in the next step, an integer array "userGuesses" is defined, which holds NUM_GUESSES value.

In the next step, two for loop is defined, in the first loop, it is used for an input value, and in the second loop, it prints the array value.    

You might be interested in
What are some ways to insert a row or column? Check all that apply.
kondaur [170]

Answer:

There are two ways to insert the new column or row in the table.

Explanation:

<u>Method I</u>

i. Select the cell where you want to add a new row or column,

ii. Click on Home Tab

iii. Find insert button in Cells Group.

iv. Click on Insert Row or Insert Column button.

By following above mentioned steps we can add a row or column in Excel sheet.

<u>Method II</u>

i. Select the cell where you want to add a new row or column,

ii. Right Click on the selected Cell.

iii. Find Insert Button in drop down menu and Click on Insert.

iv. There are four options in POP menu, choose Entire Row or Entire Column to insert row or column.

4 0
4 years ago
Read 2 more answers
Please help!! I attached an image with the questions.
stira [4]

Answer:

why do you need help

Explanation:

yea

8 0
3 years ago
Which of the following is the best reason to use a macro?: *
marin [14]

Answer:c)You want to automate a repetitive task to save time

Explanation: Macro is the program that is utilized when there is a requirement of a task or operation to be repeated in a automatic way.This helps in saving the time without commanding the same operation to take place manually.

This program works by taking the into and generating the preset output sequence. Other options are incorrect because it does not help in email functions, correction of the citation in documents or generation of the table.Thus, the correct option is option(c).

7 0
3 years ago
PLZ HELP!!!
mariarad [96]
Answer: A. Usability testing
Explanation:
Usability testing would be the correct answer because if the user interface isn't "frendly" then people won't be able to use it properly. Or if you are refering to the word friendly as looking safe, then even more so would be usability testing. Because if people don't like the fonts and styles of the user interface, they might not use it at all.
8 0
3 years ago
Traditionally, remote administrative access on routers was configured using Telnet on TCP port 23. However, Telnet was developed
FinnZ [79.3K]

<u>Explanation</u>:

It is an all-too-often used technology today in connecting several computers together via a network.

Routing simple terms means the action of selecting the path taken by the traffic of data in a network of computers. The routing systems involve the use of both wireless and cable based architectures. Some common example of routing systems includes:

  1. Dynamic Routing
  2. Static routing
  3. Default Routing
5 0
3 years ago
Other questions:
  • What are the example of dedicated computers?
    5·1 answer
  • Which type babshshshhsshshhshshshhshs
    13·1 answer
  • Which of the following parameters should match in order for a pair of routers to form an adjacency when running OSPFv2? (Points
    9·1 answer
  • Please answer this I know that no one else does but I can't think right now
    10·1 answer
  • Write a function called lucky_sevens that takes in one #parameter, a string variable named a_string. Your function #should retur
    15·1 answer
  • Design two subclasses of Employee…SalariedEmployee and HourlyEmployee. A salaried employee has an annual salary attribute. An ho
    12·1 answer
  • Which option should you select to ignore all tracked changes in a document? To ignore all tracked changes in a document, you sho
    15·2 answers
  • The first step to accurate coding is to identify the ___________ in the diagnostic statement.
    7·1 answer
  • Kellyn needs to move Slide 8 of his presentation up so that it becomes Slide 6. What best describes how he can do this using the
    11·2 answers
  • Which option identifies the programming paradigm selected in thr following scenario? A student is writing a science fiction stor
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!