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
mart [117]
2 years ago
15

Write your code to define and use two functions. The Get User Values function reads in num Values integers from the input and as

signs to user Values. The Output Ints Less Than Or Equal To Threshold function outputs all integers in user Values that are less than or equal to maxVal. num Values indicates the number of integers in user Values. void Get User Values(int user Values[], int num Values) void Output Ints Less Than Or Equal To Threshold (int user Values[], int maxVal, int num Values)
Computers and Technology
1 answer:
ZanzabumX [31]2 years ago
6 0

Answer:

#include <iostream>

#include <vector>

using namespace std;

/* Define your function here */

vector<int> GetUserValues(vector<int>& userValues, int numValues) {

  int tmp = 0;

  vector<int> newVec;

 

  for(int i = 0; i < numValues; i++) {

     cin >> tmp;

     newVec.push_back(tmp);

     

  }

 

  return newVec;

}

void OutputIntsLessThanOrEqualToThreshold(vector<int> userValues, int upperThreshold) {

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

     if(userValues.at(i) < upperThreshold) {

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

     }

  }

 

  cout << endl;

}

int main() {

  vector<int> userValues;

  int upperThreshold;

  int numValues;

 

  cin >> numValues;

  userValues = GetUserValues(userValues, numValues);

  cin >> upperThreshold;

  OutputIntsLessThanOrEqualToThreshold(userValues, upperThreshold);

  return 0;

}

Explanation:

Perhaps their is a better way to code this, but I couldn't figure out what to do with the pointer in the first function.

You might be interested in
Match each definition to the correct type of media.
Murrr4er [49]

Answer:

1-2

2-3

3-1

Explanation:

I couldn't find a way to explain this.

6 0
2 years ago
Read 2 more answers
Can anyone answer this ​
Ivenika [448]

Answer:

I dont see the question

Explanation:

7 0
2 years ago
Which property do you use to align an element horizontally with the left or right edge of its parent element?
Ugo [173]
A thank me later:) give me hearts
3 0
2 years ago
Jemima has finished formatting her main headings. She now wants to format her two subheadings. She wants to apply the format of
klasskru [66]

Answer:

the Format Painter feature

6 0
3 years ago
a data tools are used to analyze large unstructured data sets, such as e-mail, memos, survey responses, etc., to discover patter
Mashcka [7]

Text mining tools are used to analyze large unstructured data sets, such as e-mail, memos, survey responses, etc., to discover patterns and relationships.

Here's the complete question:

__________ tools are used to analyze large unstructured data sets, such as e-mail, memos, survey responses, etc., to discover patterns and relationships.

- OLAP

- Text Mining

- Web mining

- Web content mining

What is Text mining?

Text mining is the process of exploring and analyzing large amounts of unstructured text data aided by software that can identify concepts, patterns, topics, keywords and other attributes in the data.

Learn more on Text mining from:

brainly.com/question/25578967?referrer=searchResults

#SPJ4

6 0
1 year ago
Other questions:
  • Jana keeps receiving friend requests from strangers on a social media site. This is making her uncomfortable.
    15·2 answers
  • Explain why using infrared telescopes would not be useful for stargazing in the city?
    14·1 answer
  • Follow up, my brother is upset at me for stealing his robux, what should i do?
    11·2 answers
  • 27. List four advantages of Computer Aided Design over traditional hand
    10·1 answer
  • What is the purpose of the .NET Framework Class Library? a. it provides pre-written code that can be used by .NET applications b
    13·1 answer
  • Exampels of semantic tags ?​
    7·1 answer
  • Which is a benefit of traditional SLR cameras over digital cameras? A. They produce negatives to serve as backups. B. They make
    6·1 answer
  • Write a program that asks the user to enter a number of seconds. There are 60 seconds in a minute. If the number of seconds ente
    9·1 answer
  • Spark is electrical discharge in air, while air is mix of variety of gases what particles conduct electricity in gas
    12·1 answer
  • Discuss the ways you can perform to prevent your computer/device and its data/contents from being stolen. Define two-facto authe
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!