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
Lera25 [3.4K]
3 years ago
5

Write a program that gets a list of integers from a user. First, the user should be asked to enter the number of integers to be

stored in a list. Then your program should ask for these integers and store them in the list. Finally, the program should ask the user to enter a sentinel value that will be used to search through the integers in the list which are greater than the sentinel value. For example: If the input is: 7 50 60 140 200 75 100 172 70 the output is: 140 200 75 100 172 The 7 indicates that there are seven integers in the list, namely 50 60 140 200 75 100 172. The 70 indicates that the program should output all integers greater than 70, so the program outputs 140 200 75 100 172. You should use methods in addition to the main method. getListValues to get and store the values from the user printListValuesGreaterThanSentinal to print the values found to be greater than the sentinel value.
Computers and Technology
1 answer:
Leviafan [203]3 years ago
5 0

Answer:

#include <iostream>

using namespace std;

void insert(int *arr, int num);

int n;

void returnGT(int arr[]);

int main(){

   cout<< "Enter the number of integers: "<<endl;

   cin>>n;

   int num[n];

   insert(num, n);

   returnGT(num);

}

void insert(int *arr, int num){

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

       cout<< "Enter item "<< i + 1 << " : ";

       cin>> arr[i];

   }

}

void returnGT(int arr[]){

   int sentinel;

   cout<< "Enter sentinel: ";

   cin>> sentinel;

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

       if (arr[i] > sentinel){

           cout<< arr[i] << " ";

       }

   }

}

Explanation:

The C++ source code defines an array of integer values, the program prompts for user input for the array size and the sentinel value to fill the array with input values and output integer values greater than the sentinel.

You might be interested in
1.Computer Architecture and their examples . 2. what are the three system bus​
Aneli [31]

Answer:

WHAT IS  THIS QUESTION?

Explanation:

Please tell,e or I will

^45*7353_=+233

7 0
2 years ago
Your company is building a new architecture to support its data-centric business focus. You are responsible for setting up the n
DedPeter [7]

The actions will meet your company's needs is to Lease a Transfer Appliance, upload archived files to it, and send it to oogle to transfer archived data to Cloud Storage.

Data centric is simply known to be an architecture where data is said to be of primary and permanent asset, and applications is temporary.

  • Businesses is all about functionality, and as such, firms often buys or build application systems.

Each application system is known to have its own unique data model, and its code is often linked with the data model used.

Conclusively, Transferring large datasets needs manpower that is the right team, planning early, and testing your transfer plan before its use.

 

Learn more data-centric business from

brainly.com/question/21810261

7 0
2 years ago
Which of the following statements is most true? A user's online identities, actions, and relationships rarely have consequences
ale4655 [162]

Answer:

Online activities are increasingly used to make real-world decisions.

Explanation:

People use increasingly <em>world wide web</em>. They create profiles and communicate with others on social networks, share thoughts and moments of their life on online platforms.

These <em>online</em> activities become part of one's identity. Therefore these activities can give information about user's behaviors, attitudes, likes and dislikes.

All this data are being used to make real world decisions about a user or a group of users. For example, trough one's online check-ins, frequently used location of the users or can be determined. Similarly, trough social media likes or posts, one's hobbies can be predicted.

Therefore, social media and online presence in general, is not necessarily safe or private but important places which have valuable information of the users that can be used in real world.

8 0
4 years ago
"under the control panel, what console contains print management, computer management, and event viewer?"
Schach [20]
The answer is administrative tools
5 0
3 years ago
Farrah plans to use BlackAdder, a multiple-language IDE, to develop software code. What must she consider before using this IDE?
Olegator [25]

Answer:

A or D

Explanation:

I think

8 0
3 years ago
Read 2 more answers
Other questions:
  • Text, numbers,graphics, sounds entered into a computer's memory during input operations are referred to as
    11·1 answer
  • Which category of app does word processing software fall into? A. Productivity B. Entertainment C. Social networking D. Educatio
    14·2 answers
  • Plllzzzzzzzzzzzzzz annnssswweeweerrr...
    6·1 answer
  • Which of the following statement is most accurate? A. A reference variable is an object. B. A reference variable refers to an ob
    6·1 answer
  • Which feature of a presentation program’s interface provides a list of commands to create, format, and edit presentations?
    14·2 answers
  • Create a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop shou
    5·1 answer
  • What does the format painter button do?
    13·1 answer
  • , 13 dB correspond to a power ratio of ....?
    14·1 answer
  • Define the missing function. licenseNum is created as: (100000 * customID) licenseYear, where customID is a function parameter.
    12·1 answer
  • 3. When the heart is contracting, the pressure is .highest. This is called the
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!