Write a programin basic language to arrange the numbers of matrix A[ 12 8 36 22 21 3 5 14 30 17] from the smallest to the greatest and then print the new matrix.
Write a programin basic language to arrange the numbers of matrix A[ 12 8 36 22 21 3 5 14 30 17] from the smallest to the greatest and then print the new matrix.
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...
Related questions
Question
I need the answer as soon as possible
![Write a program in basic language to arrange the numbers of matrix
A[ 12 8 36 22
the greatest and then print the new matrix.
21 3 5 14 30 17] from the smallest to
10 DIM A (10)
10 DIM A (10)
20 FOR I-I TO 10
20 POR I-1 TO 10
O READ A (D
30 READ A D
tODATA 12.836,22213,5.14,3.I7
40 DATA 12,8 36,22213,5.14.3a0.12
SO NEXTI
5O NEXTI
60 FOR I-I TO 9
e roR I-1 TO9
POR I TO9
20 FOR TO 9
s0 IF AHD<AN THEN SWAP A-1. A)
B0 IF AO N) THEN SWAP A-1), A)
90 NEXTI
90 NEXTI
100 NEXTE
100 NEXTI
110 END
110END
Option 1
O Option 2
10 DIM A (10)
10 DIM A 10)
20 FOR I-I TO 10
20 FOR 1-ITO 10
30 READ A )
30 iREAD A )
40DATA 12,36,221AS9,1T
40DATA12.36222S 6.17
s0 NEXTI
50 NEXTI
60 FOR I-I TO
60 POR I T09
to FOR -I To 9
70 FOR J-I TO9
s0 IF AD1) A) TUNSWAP A1, AD
s0 IF AO-1) AU) THEN SWAP A). AD
90 NEXTI
90 NEXTI
100 NEXTI
100 NEXTI
110 END
110 END
Option 3
O Option 4
O This is a required question
Convert the matrix A(10,10) to one dimensional matrix [B]
10 DIM A(10,10),B(100)
20 FOR I=1 TO 10
10 DIM A(10,10).B(100)
20 FOR I=1 TO 10
30 FOR J=1 TO 10
40 INPUT AI,J)
50 K=K+1
60 B(K)= A(IJ)
70 NEXT J: NEXTI
80 END
30 FOR J=1 TOo 10
40 INPUT AIJ)
50 K=K+1
60 B(K)= A(I,J)
70 NEXT J: NEXTI
80 END
O Option 1
O Option 2
10 DIM A(10,10),B(100)
20 FOR I=1 TO 10
30 FOR J=1 TO 10
40 INPUT AIJ)
50 K=K+1
60 AI,J) = B(K)
70 NEXT J: NEXTI
80 END
10 DIM A(10*10),B(100)
20 FOR I=1 TO 10
30 FOR J=1 TO 10
40 INPUT AI,J)
50 K=K+1
60 B(K)= A(IJ)
70 NEXT J: NEXTI
80 END
Option 3
O Option 4
This is a required question](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fa3aea17b-0808-41aa-96e0-3b2347b7b541%2Fbdb390ed-d687-446c-a8c3-88cfe86eaa1f%2Flmof8r8_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Write a program in basic language to arrange the numbers of matrix
A[ 12 8 36 22
the greatest and then print the new matrix.
21 3 5 14 30 17] from the smallest to
10 DIM A (10)
10 DIM A (10)
20 FOR I-I TO 10
20 POR I-1 TO 10
O READ A (D
30 READ A D
tODATA 12.836,22213,5.14,3.I7
40 DATA 12,8 36,22213,5.14.3a0.12
SO NEXTI
5O NEXTI
60 FOR I-I TO 9
e roR I-1 TO9
POR I TO9
20 FOR TO 9
s0 IF AHD<AN THEN SWAP A-1. A)
B0 IF AO N) THEN SWAP A-1), A)
90 NEXTI
90 NEXTI
100 NEXTE
100 NEXTI
110 END
110END
Option 1
O Option 2
10 DIM A (10)
10 DIM A 10)
20 FOR I-I TO 10
20 FOR 1-ITO 10
30 READ A )
30 iREAD A )
40DATA 12,36,221AS9,1T
40DATA12.36222S 6.17
s0 NEXTI
50 NEXTI
60 FOR I-I TO
60 POR I T09
to FOR -I To 9
70 FOR J-I TO9
s0 IF AD1) A) TUNSWAP A1, AD
s0 IF AO-1) AU) THEN SWAP A). AD
90 NEXTI
90 NEXTI
100 NEXTI
100 NEXTI
110 END
110 END
Option 3
O Option 4
O This is a required question
Convert the matrix A(10,10) to one dimensional matrix [B]
10 DIM A(10,10),B(100)
20 FOR I=1 TO 10
10 DIM A(10,10).B(100)
20 FOR I=1 TO 10
30 FOR J=1 TO 10
40 INPUT AI,J)
50 K=K+1
60 B(K)= A(IJ)
70 NEXT J: NEXTI
80 END
30 FOR J=1 TOo 10
40 INPUT AIJ)
50 K=K+1
60 B(K)= A(I,J)
70 NEXT J: NEXTI
80 END
O Option 1
O Option 2
10 DIM A(10,10),B(100)
20 FOR I=1 TO 10
30 FOR J=1 TO 10
40 INPUT AIJ)
50 K=K+1
60 AI,J) = B(K)
70 NEXT J: NEXTI
80 END
10 DIM A(10*10),B(100)
20 FOR I=1 TO 10
30 FOR J=1 TO 10
40 INPUT AI,J)
50 K=K+1
60 B(K)= A(IJ)
70 NEXT J: NEXTI
80 END
Option 3
O Option 4
This is a required question
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY