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
Maya is preparing a presentation for her science class on how solar panels produce energy. Why would a
astra-53 [7]
A.) it the best way to show how something functions
5 0
3 years ago
Read 2 more answers
Please help can’t get a bad grade!
SOVA2 [1]

Answer:

Algorithms are a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.

Pseudo code is an informal description of an algorithm or how a program will function.

a. An example of an algorithm using coding terminology would be a function to find the largest or smallest number in a user-defined array.

b. A function that could include an algorithm would be a function that compares input.

c. Pseudo code could be used to outline a part of a program that has to carry out a specific function.

I hope that helped! If you have any questions I am glad to help.

5 0
3 years ago
So, I am homeschooled, and I want to watch videos on my school account because I might be waiting for like emails from my teache
Jobisdone [24]

what web browser

if firefox go to addons and see if you can turn off mkaffee or something like that

or go incogneto

plese give me branliest good luck

3 0
3 years ago
Read 2 more answers
____ is a systems development technique that produces a graphical representation of a concept or process that systems developers
rosijanka [135]

Answer:

D. Modeling

Explanation:

<em>Modeling</em>: It is a graphical representation, of a concept or system, technique used by software developer to analyze, test, and modify that system or concept.

4 0
4 years ago
When a program lets the user know that an invalid menu choice has been made, this is an example of?
kolezko [41]

The question has the multiple choices below

A) Input validation
B) output correction
C) compiler criticism
D) output validation

The answer is (A) Input validation

Also known as data validation, it is the correct and proper testing of any input supplied by an application or a user. It prevents wrongly formed data from entering the system. Applications should be able to check and validate every input entered into the system since it is hard to detect a malicious user trying to gain entry into software.










5 0
3 years ago
Other questions:
  • The rubric given to them by their teacher requires that
    14·1 answer
  • A ___________ is used when an extra digit is added to a coded field to make sure it the entered data is correct (like social sec
    14·1 answer
  • Which feature of a browser will you select to block pop-ups? view help tools file
    15·2 answers
  • The length of time the valve is open, expressed in degrees of crankshaft rotation, is called camshaft
    10·1 answer
  • A simple way to think of the Excel application is as a giant ______.
    5·2 answers
  • Extended ACLs can filter traffic based on _____. (Points : 3) protocol type
    8·1 answer
  • A ______ workstation is a network terminal that supports a full-featured user interface, but limits the printing or copying of d
    5·1 answer
  • Anyone else getting 502 bad gateway on here?
    7·1 answer
  • A small company with 100 computers has hired you to install a local area network. All of the users perform functions like email,
    9·1 answer
  • The four differences between binary and denary​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!