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
dimaraw [331]
2 years ago
10

Using the constant, declare a 1D array to store 10 integers ii. Write a loop that fills the array with 10 random numbers g

Computers and Technology
1 answer:
Airida [17]2 years ago
5 0

Answer:

Following are the code to this question:

#include <iostream>//defining header file

#include <cstdlib>//defining header file

using namespace std;

int main()//defining main method

{

const int ax[10]={1,2,3,4,5,6,7,8,9,10};//defining a const array ax that store 10 numbers

int r_num[10];//defining an array r_num

int i;//defining integer variable

for(i=0;i<10;i++)//defining for loop to calculate and store random numbers in array

{

   r_num[i]=rand()%100; //use rand function to store value in array

}

cout<<"Elements of the array that stores 10 random numbers: "<<endl;//print message

for(i=0;i<10;i++)//defining for loop for print array value

{

   cout<<r_num[i]<<endl;//print array value

}

return 0;

}

Output:

Elements of the array that stores 10 random numbers:  

83

86

77

15

93

35

86

92

49

21

Explanation:

In the above-given program, two arrays "ax, and r_num" is declared that store value in it, in which the ax array use the const keyword and in the r_num it uses the loop and random function which can be defined as follows:

In the second array "r_num", two for loop is declared, in which the first loop uses the rand function to store value in the array, and in the second array, it prints the value of the array.

You might be interested in
Which of the following is your personal record of payments and bill-paying?
oksian1 [2.3K]

Answer:

I believe its a statement

Explanation:

4 0
3 years ago
Define the acronym WAECUP and its components
Mariana [72]

WAECUP stands for waste, accident, error, crime, and unethical practices.

Assuming that the components are the same as what's included in the acronym, that should be your answer.

Hope this helps!

8 0
2 years ago
How do you find the exterior angle measure of any regular polygon? (The degree in which to turn the turtle to draw a shape)
Diano4ka-milaya [45]

Answer:

360/number of sides

Explanation:

all the exterior angles add up to 360°

so to find each angle mesure, divide the 360 by the number of sides the figure has.

7 0
3 years ago
Which of the following are vector graphic file formats? Choose all that apply.
blondinia [14]

There are different kinds of files. The option that is a vector graphic file formats is SVG.

<h3>What are vector files?</h3>

Vector files are known to be a type of images that are created by using mathematical formulas that stands as points on a grid.

The SVG  is known as Scalable Vector Graphics file and it is known to be a  vector image file format as it make use of geometric forms such as points, lines, etc.

Learn more about vector graphic file from

brainly.com/question/26960102

3 0
2 years ago
Vivek wants to save the data about his grocery store in a single table. Which among the following type of databases is used in t
Orlov [11]

Explanation:

A centralized database (sometimes abbreviated CDB) is a database that is located, stored, and maintained in a single location.

4 0
2 years ago
Other questions:
  • Why might people feel differently about their digital lives?
    11·1 answer
  • Write an application named [LastName]_MultiplicationTable and create a method that prompts the user for an integer value, for ex
    11·1 answer
  • Suppose barriers to entry exist in the telecommunications industry. This best describes a _____ market.
    12·1 answer
  • What function should be entered into B7 to calculate the total budget
    15·2 answers
  • Which function of a word processing program enables you to apply a preset formatting
    5·1 answer
  • If I wished to insert a hyperlink from text in my document to my company website, what type of link would I insert?
    9·1 answer
  • c724 wgu True or false. A storage device consists of all the components that work together to process data into useful informati
    10·1 answer
  • Write a program that reads in 10 numbers and displays the number of distinct numbers and the distinct numbers in their input ord
    14·1 answer
  • Login
    11·1 answer
  • How did the use of ARPANET change computing?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!