Compute set of number.  Waiting for code

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
100%

7. Compute set of number. 

Waiting for code

 

3.
Write a program that takes in a set of numbers. The numbers will be stored in an
array. The size of the array (how many numbers to take in) is defined by the user.
Then scan through the numbers in the array to do indexing from the smallest to the
largest. You can choose to use any types of sorting methods.
An example of the output interface:
Prepared by Name and ID: 12345
Class: 3SPG1
This program takes in a set of numbers and performs sorting and indexing.
Please key how many numbers do you want to sort (max. 20): 5
Key in number #1:5
Key in number #2: 4
Key in number #3: 6
Key in number #4:3
Key in number #5: 1
The original order of the numbers are: 54631
The sorted numbers are: 13456
The index for number #1 (5) is 4
The index for number #2 (4) is 3
The index for number #3 (6) is 5
The index for number # 4 (3) is 2
The index for number #5 (1) is 1
Do you want to repeat the program? (Y/N): N
Thanks for using my program.
Press any key to continue.
- rks]
Transcribed Image Text:3. Write a program that takes in a set of numbers. The numbers will be stored in an array. The size of the array (how many numbers to take in) is defined by the user. Then scan through the numbers in the array to do indexing from the smallest to the largest. You can choose to use any types of sorting methods. An example of the output interface: Prepared by Name and ID: 12345 Class: 3SPG1 This program takes in a set of numbers and performs sorting and indexing. Please key how many numbers do you want to sort (max. 20): 5 Key in number #1:5 Key in number #2: 4 Key in number #3: 6 Key in number #4:3 Key in number #5: 1 The original order of the numbers are: 54631 The sorted numbers are: 13456 The index for number #1 (5) is 4 The index for number #2 (4) is 3 The index for number #3 (6) is 5 The index for number # 4 (3) is 2 The index for number #5 (1) is 1 Do you want to repeat the program? (Y/N): N Thanks for using my program. Press any key to continue. - rks]
Expert Solution
steps

Step by step

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