Exercise: Enter the number of rows: 5 1- Write a program that shows the following output: 123 12345 |1234567 123456789 1234567 12345 123

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
Exercise:
Enter the number of rown: 5
1- Write a program that shows the following output:
1
123
12345
1234567
123456789
Zahraa
1234567
12345
123
1
2- Suppose W is a (6,4) two-dimension array. Write a program which sorts W on
column by column so that its elements are increasing (Ascending) and stores
in the same array. Display the new array (W) in a picturebox.
4719
537 11
2 13 66 32
13 9 10 4
21 8 15 11
16 22 60
1314
2679
47 10 11
58 15 11
13 9 22 32
21 13 66 60
Computer Principles II - Asst. Lect. Zahraa A. Nejim
3- Write a program to read and print Wan array of 5 numbers then print the array
in reverse order.
4- Write a program to read and print an array of 20 elements. Split the odd and
even numbers in that array into two arrays.
5- Write a program to read and print a 3 by 4 array. Find the summation of each
row.
0,0 0,1 0,2
0,0 0,1 0,2
0,0 0,1 0,2
0,0 0,1 0,2
1,0 1,1 1,2
1,0 1,1 1,2
1,0 1,1 1,2
1,0 1,1 1,2
2,0 2,1 2,2
2,0 2,1 2,2
2,0 2,1 2,2
2,0 2,1 2,2
i=j
i+j=n-1
i>j
i<j
n is the dimension of an array.
6- Write a program to read and print a 3 by 3 array. Replace the main diagonal
elements with zero.
Zahraa
Transcribed Image Text:Exercise: Enter the number of rown: 5 1- Write a program that shows the following output: 1 123 12345 1234567 123456789 Zahraa 1234567 12345 123 1 2- Suppose W is a (6,4) two-dimension array. Write a program which sorts W on column by column so that its elements are increasing (Ascending) and stores in the same array. Display the new array (W) in a picturebox. 4719 537 11 2 13 66 32 13 9 10 4 21 8 15 11 16 22 60 1314 2679 47 10 11 58 15 11 13 9 22 32 21 13 66 60 Computer Principles II - Asst. Lect. Zahraa A. Nejim 3- Write a program to read and print Wan array of 5 numbers then print the array in reverse order. 4- Write a program to read and print an array of 20 elements. Split the odd and even numbers in that array into two arrays. 5- Write a program to read and print a 3 by 4 array. Find the summation of each row. 0,0 0,1 0,2 0,0 0,1 0,2 0,0 0,1 0,2 0,0 0,1 0,2 1,0 1,1 1,2 1,0 1,1 1,2 1,0 1,1 1,2 1,0 1,1 1,2 2,0 2,1 2,2 2,0 2,1 2,2 2,0 2,1 2,2 2,0 2,1 2,2 i=j i+j=n-1 i>j i<j n is the dimension of an array. 6- Write a program to read and print a 3 by 3 array. Replace the main diagonal elements with zero. Zahraa
Expert Solution
steps

Step by step

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