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
The operating cost of driving include
blagie [28]
And what is the question?
4 0
2 years ago
Do you think that the TV set has outlived its utility as a household appliance? Research how convergence with internet technolog
kherson [118]

Answer:

What is Computer? & technology

7 0
1 year ago
For what reason can security risks never be fully eliminated?​
raketka [301]

Answer:

A vulnerability level of ZERO can never be obtained since all countermeasures have vulnerabilities themselves. For this reason, vulnerability can never be zero, and thus risk can never be totally eliminated.

Explanation:

also we need to be protected from scams and stuff

7 0
2 years ago
My ar goal is 16.3 what percent am i at if i have 3 points??
Mazyrski [523]

24 percent so far so keep working at that goal

5 0
3 years ago
Which type of books contains snapshots of steps that help to perform an activity?
stellarik [79]

Answer:

online book,,.........,.

5 0
3 years ago
Read 2 more answers
Other questions:
  • Ted is a fashion designer. Where is he most likely to work
    9·1 answer
  • Write a Python program that reads the CSV file, compares the population estimates of every row for 2010 and 2017 and computes th
    10·1 answer
  • After compiling source code, which command still needs to be run in order to copy the newly compiled binaries into a directory l
    5·1 answer
  • Write a program that receives an character and displays its Unicode. Here is a sample run: Enter an character: E The Unicode for
    8·1 answer
  • Can you awnser this question
    15·1 answer
  • Application of computer in insurance​
    14·1 answer
  • Ou have recently issued new mobile phones to the sales team in your company. Each phone has the ability to store and transmit en
    14·1 answer
  • Jacob has a text file open, and he is typing on the keyboard. What is the best description of how the
    8·1 answer
  • Explain why the operating system hides certain folders ​
    5·1 answer
  • STM-1 contains 63 primary 2-Mbps data streams and each of them contains 30 time slots for speech.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!