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
When preparing images to be used for different mediums print web and video in photoshop different file formats are required , se
Anika [276]
The answers are :
JPEG - Compresses well without losing quality, it should be used for the web
TIFF - Can be saved in an uncompressed file format with a high resolution, it is a common file format used for professional print services
BMP - Can be saved in a compressed or uncompressed file format, It is a common file format used for either web or print
<span>FLV or SWF - Used to publish a rendered video for use on the web</span>
5 0
3 years ago
Suppose we can buy a chocolate bar from the vending machine for $1 each. Inside every chocolate bar is a coupon. We can redeem s
Tanya [424]

Answer and Explanation:

Using JavaScript:

/* program should take N input which represents the dollar amount and output how many chocolate bars and how many coupons we have*/

function chocolatebar(dollars){

var dollaramt= dollars;

var i;

for(i=0; i <= dollaramt; i++){

i=i+6

?

Alert ("you have 1 extra chocolate bar");

:

Alert ("keep buying chocolate bars to get more coupons for a bonus chocolate bar")

}

}

*

7 0
3 years ago
Which best compares appointments and events in Outlook 2010
lesantik [10]

In Microsoft Outlook, there are differences between appointment and event. Appointment is defined as <em>an activity that you schedule in your calendar which does not involve other people.</em> Appointments can be scheduled to a certain duration in a day. Event is defined as <em>an activity that you do with other people which lasts from 24 hours to longer. </em>

Thus, from these descriptions, the best answer to the question is (C) appointments have a start and end time of day, and events do not.

5 0
3 years ago
Which telecommunications offering is a component of social media? A.)web conferencing
vichka [17]
I would say C. podcast??? not for sure
7 0
3 years ago
Read 2 more answers
Why can't I post a math question (here on brainly)? It just keeps loading it's been almost an hour.
liubo4ka [24]

Answer:

have you tried establishing a secure network?

Explanation:

8 0
2 years ago
Read 2 more answers
Other questions:
  • What are some of the challenges that could arise from setting up a file management system on a computer?
    11·1 answer
  • The data selected to create a table must include
    10·2 answers
  • To remove text from a specific location and keep it to use again, you should select ___
    6·1 answer
  • When searching the web software programs called fetch a few web pages and then they follow the links on those pages and fetch th
    9·2 answers
  • What is the IEEE 802 standards name for a wireless network that is limited to one person's workspace?
    14·1 answer
  • PrimeFactorization.java: Write a program that begins by reading in a series of positive integers on a single line of input and t
    12·1 answer
  • Plzz help me with this question.........
    6·1 answer
  • Hello i need help whats -5 = 500
    13·2 answers
  • Write the line of Python code that calculates and prints the answer to the following arithmetic expressions.
    7·1 answer
  • What are the real-life applications of coding?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!