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...
icon
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
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
steps

Step by step

Solved in 3 steps with 1 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