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]
2 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]2 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
If given the chance to own manage a business,what will be the name of the business?
Nady [450]
This is honestly an answer you can give. What would you name a business if you made one?
7 0
3 years ago
Read 2 more answers
Este tipo de software sirve para controlar e interactuar con el sistema operativo, proporcionando control sobre el hardware y da
attashe74 [19]

Answer: c

Explanation:

4 0
2 years ago
A continuous and differentiable function f(x) with the following properties: f(x) is decreasing at x=−5 f(x) has a local minimum
butalik [34]

The continuous and differentiable function where f(x) is decreasing at x = −5 f(x) has a local minimum at x = −2 f(x) has a local maximum at x = 2 is given as: y = 9x - (1/3)x³ + 3.

<h3>What is a continuous and differentiable function?</h3>

The continuous function differs from the differentiable function in that the curve obtained is a single unbroken curve in the continuous function.

In contrast, if a function has a derivative, it is said to be differentiable.

<h3>What is the solution to the problem above?</h3>

It is important to note that a function is differentiable when x is set to a if the function is continuous when x = a.

Given the parameters, we state that

f'(5) < 0; and

x = -5

The local minimum is given as:
x = -3;

the local maximum is given as

x = 3

Thus, x = -3 ; alternatively,

x = 3.  With this scenario, we can equate both to zero.

Hence,

x + 3 = 0;

3-x = 0.

To get y' we must multiply both equations to get:

y' = (3-x)(x + 3)

y'   = 3x + 9 - x² - 3x

Collect like terms to derive:

y' = 3x - 3x + 9 - x²; thus

y' = 9-x²

When y' is integrated, the result is

y = 9x - (x³/3) + c

Recall that

F (-5) < 0

This means that:

9 x -5 - (-5³/3) + c < 0
⇒ -45 + 125/3 + c <0
⇒ -10/3 + c < 0

Collecting like terms we have:
c < 10/3; and

c < 3.33


Substituting C into

f(x) = 9x - x³/3 + c; we have

f(x) = 9x - x³/3 + 3, which is the same as  y = 9x - (1/3)x³ + 3.

Learn more about differentiable functions at:
brainly.com/question/15047295
#SPJ1

7 0
2 years ago
Each of the following are advanced strategies you may use to help you conduct a search on the Internet except _____. using a wil
malfutka [58]

i cant see anything tho theres nothing there

4 0
3 years ago
Read 2 more answers
The weight of your car will also affect its_____.
Usimov [2.4K]

Answer: C

Explanation:

4 0
2 years ago
Read 2 more answers
Other questions:
  • Aubrey didnt like to use graphics or images on her slides. She preferred to use only a title for her slides and bullet-poinged t
    14·2 answers
  • Write a program to input money in cents from user, example 12745 and display the one dollar bills and the cents. Submit source c
    12·1 answer
  • Natural selection is a. how systems of rewards increase desired behaviors. b. the idea that the observable environment affects b
    6·1 answer
  • Which of these sites would need additional investigation to check for reliability?
    8·2 answers
  • Purpose Your goal is to create a design for a software interface. You will experience the scope of the design process from brain
    7·1 answer
  • What best describes presentation software?
    14·1 answer
  • What are horizontal and vertical page break? how and where are these inserted?​
    10·1 answer
  • You are splitting up all your apples equally between 3 people. which statement below will calculate how many apples will be left
    12·1 answer
  • Hello everyone! can anybody help me? i need help with computing.
    10·1 answer
  • What is added to brining liquid to add flavour​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!