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
Darya [45]
3 years ago
10

write a program that will create an array of 100 random integers in the range from [0,99] pass the array to a function, printarr

ay(), that will print the values of the array on the monitor. pass the array to a function, sortarray(), that will sort the array. Pass the array to printarray() again and print it in increasing order
Computers and Technology
1 answer:
slava [35]3 years ago
5 0

Answer:

In C++:

#include <cstdlib>  

#include <ctime>  

#include <iostream>

#include <bits/stdc++.h>

using namespace std;

void printarray(int array []){

for(int i=0; i<100; i++){         cout << array[i] << " ";    }

}

void sortarray(int array []){

sort(array, array + 100);

   printarray(array);

}

int main() {  

   int array[100];

   srand((unsigned)time(0));  

   for(int i=0; i<100; i++){  array[i] = (rand()%99);     }

   printarray(array);

   cout<<endl;

   sortarray(array);

   return 0;

}

Explanation:

<em>See attachment for program source file where comments are used for explanation purpose</em>

Download cpp
You might be interested in
Why would students most likely need to collect data? Check all that apply
n200080 [17]
Well I would think all of them in some way. For the first one, students need to collect data (whether it’s mathematical, scientific, etc.) to answer a question. For the second one, they may need to know how much money is in there bank account or they may need to calculate a sale to order the item. For the third one, they may need statistical data to support a position. For the last one, a student could use technological data to be able to solve their problem sorting documents.
5 0
3 years ago
Read 2 more answers
Mr. Yang is a doctor who regards video games as an effective means of staying fit. What type of game would he recommend to his p
LUCKY_DIMON [66]

wii sports, just dance, etc.

Explanation:

3 0
3 years ago
Consider ________ when designing for display on a mobile device. font size all of these contrast small screen size
Delvig [45]
To be honest...i really dont know 
6 0
3 years ago
Read 2 more answers
Anthony is deciding between different savings accounts at his bank. He has four options, based on how frequently interest compou
leonid [27]
Depends is the answer multiple choice
7 0
3 years ago
Read 2 more answers
You are a desktop administrator for Nutex Corporation. A user reports that he is unable to access network resources. You notice
Tju [1.3M]

Answer:

The right answer is wire crimper tool.

Explanation:

According to the scenario, the most appropriate answer is the wire crimping tool because the wire crimping tool is a tool that can strip the wire then cut it in proper shape and then crimp the wire in the RJ45 connector very effectively.

RJ45 connector is a connector which is used in ethernet cables to connect to computers i.e. cat 5, cat 5e, cat 6, etc. these cable has 4 pairs of different color codes.

A wire crimper effectively connects the end of the cable to an RJ45 connector.

4 0
3 years ago
Other questions:
  • TRUE OR FALSE, databases allow you to search for content on the internet based on certain criteria (PLS ANSWER RIGHT)
    10·2 answers
  • In a relational database, the three basic operations used to develop useful sets of data are:
    10·1 answer
  • Select the correct answer.
    12·2 answers
  • Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output tho
    9·1 answer
  • What was bill gates first operating system he created?
    7·1 answer
  • What is the purpose of application software policies?
    12·1 answer
  • The site is not allowing me to purchase the subscription. Please help?
    12·1 answer
  • What are some pros for having your phone during school hours?
    10·2 answers
  • Question 12 (2 points)
    10·2 answers
  • The objective fuction of linear progrmming should be
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!