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
Which is an example of analog d<br><br><br>evice​
neonofarm [45]

Answer:

crt (cathode ray tube) vcr (video cassette recorder)

Explanation:

8 0
1 year ago
What does SIP stand for?
agasfer [191]
Session Initiation Protocol, brainliest ?
4 0
3 years ago
Read 2 more answers
Your IT manager wants you to set up three computers to appear to users as one powerful Windows Server 2016 server. What capabili
Marina86 [1]

Answer:

The answer is "Clustering"

Explanation:

Clustering is a technique, which includes the Microsoft Windows and the coordination with an individual multi-PC's, that is mostly connected to the local area network, as a single platform.

  • It is cheaper than one device.
  • It enables you to greater machine performance and increases usability and reliability, that's why the answer to this question is "Clustering".
4 0
2 years ago
If all humans started from one tiny cell why do you think we all look and act differently
scZoUnD [109]
The one cell evolved into different categories by adapting to its human/animal/plant’s habitat
3 0
3 years ago
Create a trigger that prevents anychange(insert, update, or delete)to the grade attribute of the takesrelation that would change
Alchen [17]

Answer:

The trigger code is given below

create trigger F1_Del

after delete on Friend

for each row

when exists (select * from Friend

where ID1 = Old.ID2 and ID2 = Old.ID1)

begin

delete from Friend

where (ID1 = Old.ID2 and ID2 = Old.ID1);

end

create trigger F1_Insert

after insert on Friend

for each row

when not exists (select * from Friend

where ID1 = New.ID2 and ID2 = New.ID1)

begin

insert into Friend values (New.ID2, New.ID1);

end

5 0
3 years ago
Other questions:
  • A _____ captures the pattern in a _____ and sends it to the computer, where special software translates the _____ into meaningfu
    8·1 answer
  • W-11/6=4<br><img src="https://tex.z-dn.net/?f=%20%20%5Cfrac%7Bx%20-%2011%20%7D%7B%206%7D%20%20%3D%204" id="TexFormula1" title="
    14·1 answer
  • python A pet shop wants to give a discount to its clients if they buy one or more pets. The discount is equal to 20 percent of t
    12·1 answer
  • Which expresses 6y : 9y in its simplest form?
    12·1 answer
  • The need to strike a<br>- among work, life, family, and other responsibilities is<br>universal.​
    15·1 answer
  • The ______ is the information center that drivers need to refer to when they're NOT scanning the road.
    14·1 answer
  • Write a program to check the password( qbasic)​
    8·1 answer
  • how risk can impact each of the seven domains of a typical IT infrastructure: User, Workstation, Local Area Network (LAN), Local
    7·1 answer
  • Which Internet connection type tends to use shared bandwidth?<br> Cable<br> Dial-up<br> DSL<br> ISDN
    5·2 answers
  • True or False? Popular sites are always mean accurate.
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!