Declare a one-dimensional array1 of 90 (9x10) elements that stores integers of the int data type. Assign unique random integers in the range of 1 (inclusive) to 90 (inclusive) to each element of this array. Then print the contents of this directory on the screen similar to the following output. 74 17 28 26 24 47 13 70 2 33 68 51 80 77 61 37 53 72 9 88 63 81 14 38 56 60 73 49 58 32 64 82 30 15 69 75 66 31 84 27 16 46 57 36 40 48 55 34 79 7 85 12 45 20 43 19 83 11 29 18 22 78 3 62 21 65 41 10 4 6 90 1 89 52 5 25 35 86 23 76 44 39 54 87 71 59 42 67 50 It will read them all, taking into account all the elements of this arays one by one. For example, it says that the first number to search is 74 and the second number is 17. 5 53 57 75 62 13 49 79 80 23 19 67 74 39 34 24 23 37 46 63 77 26 39 88 10 31 45 22 1 75 9 38 51 69 17 63 45 28 80 74 90 49 34 21 72 50 82 75 20 62 21 18 66 79 48 81 85 59 1 35 18 19 80 42 6 15 3 76 28 85 30 50 66 20 84 Array2 with 75 (5x15) elements consists of random numbers, find numbers similar to array 1, replace them with -1 and write the c++ code that replaces them in array2. As seen in the figure below: 5 53 57 75 62 -1 49 79 -1 23 19 67 -1 39 34 |-1 23 37 46 63 77 -1 39 88 10 31 45 22 1 75 9 38 -1 69 -1 63 45 -1 -1 -1 90 49 34 21 72 50 82 75 20 62 21 18 66 79 48 81 85 59 1 35 18 19 -1 42 6 15 3 76 -1 85 30 50 66 20 84

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Declare a one-dimensional array1 of 90 (9x10) elements that stores integers
of the int data type. Assign unique random integers in the range of 1
(inclusive) to 90 (inclusive) to each element of this array. Then print the
contents of this directory on the screen similar to the following output.
74 17 28
26 24 47 13 70
2 33
68 51 80 77 61 37 53 72
9 88
63
81
14
38
56
60
73
49
58
32
64
82
30
15
69
75
66
31
84
27
16
46
57
36
40
48
55
34
79
7
85
12
45
20
43
19
83
11
29
18
22
78
3
62
21
65
41
10
4
6 90 1 89 52 5 25 35 86 23
76 44 39 54 87 71 59 42 67 50
It will read them all, taking into account all the elements of this arays one
by one. For example, it says that the first number to search is 74 and the
second number is 17.
5 53 57 75 62 13 49 79 80 23 19
67 74 39 34
24 23 37 46 63
77 26 39 88 10 31
45 22
1 75
9 38 51 69 17 63 45 28 80 74 90 49 34 21 72
50 82 75 20 62 21 18 66 79 48 81 85 59
1 35
18 19 80 42
6 15 3 76 28 85 30 50 66 20 84
Array2 with 75 (5x15) elements consists of random numbers, find numbers
similar to array 1, replace them with -1 and write the c++ code that replaces
them in array2.
As seen in the figure below:
5 53 57 75 62 -1 49 79
-1 23 19 67 -1 39 34
|-1 23 37 46 63 77 -1 39
88 10 31 45 22
1 75
9 38 -1
69 -1
63 45
-1
-1 -1 90 49 34 21 72
50 82 75 20 62 21
18 66
79 48 81 85 59
1 35
18 19 -1 42
6 15
3 76
-1 85 30 50 66 20 84
Transcribed Image Text:Declare a one-dimensional array1 of 90 (9x10) elements that stores integers of the int data type. Assign unique random integers in the range of 1 (inclusive) to 90 (inclusive) to each element of this array. Then print the contents of this directory on the screen similar to the following output. 74 17 28 26 24 47 13 70 2 33 68 51 80 77 61 37 53 72 9 88 63 81 14 38 56 60 73 49 58 32 64 82 30 15 69 75 66 31 84 27 16 46 57 36 40 48 55 34 79 7 85 12 45 20 43 19 83 11 29 18 22 78 3 62 21 65 41 10 4 6 90 1 89 52 5 25 35 86 23 76 44 39 54 87 71 59 42 67 50 It will read them all, taking into account all the elements of this arays one by one. For example, it says that the first number to search is 74 and the second number is 17. 5 53 57 75 62 13 49 79 80 23 19 67 74 39 34 24 23 37 46 63 77 26 39 88 10 31 45 22 1 75 9 38 51 69 17 63 45 28 80 74 90 49 34 21 72 50 82 75 20 62 21 18 66 79 48 81 85 59 1 35 18 19 80 42 6 15 3 76 28 85 30 50 66 20 84 Array2 with 75 (5x15) elements consists of random numbers, find numbers similar to array 1, replace them with -1 and write the c++ code that replaces them in array2. As seen in the figure below: 5 53 57 75 62 -1 49 79 -1 23 19 67 -1 39 34 |-1 23 37 46 63 77 -1 39 88 10 31 45 22 1 75 9 38 -1 69 -1 63 45 -1 -1 -1 90 49 34 21 72 50 82 75 20 62 21 18 66 79 48 81 85 59 1 35 18 19 -1 42 6 15 3 76 -1 85 30 50 66 20 84
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY