If N*0.43 is not exactly an integer, then take the floor. For example, if N= ired integer should be greater than exactly 51 of the integers in the list sin *0.43=51.6. Find the integer without sorting the entire list. The input inte ieved through stdin. Do not use any library classes or functions if the functionality directly. Implement the algorithm and logic with your o add a sorting method to verify that your result is correct. However, gram finds the desired integer through sorting alone, you will get at dit. esting, you can first create a text file storing the N unsorted integers (e.g. d then use standard input redirection. Some sample runs can look like the Myos < integerList.txt

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
1. Given a list of N (N>=100) distinct integers in unsorted order, write a C or C++ or Java
program to find the integer in the list that is greater than exactly 43% of the integers in the
list. If N*0.43 is not exactly an integer, then take the floor. For example, if N=120, then the
desired integer should be greater than exactly 51 of the integers in the list since
120*0.43=51.6. Find the integer without sorting the entire list. The input integers should be
retrieved through stdin. Do not use any library classes or functions if they can achieve
this functionality directly. Implement the algorithm and logic with your own code. You
can add a sorting method to verify that your result is correct. However, if your
program finds the desired integer through sorting alone, you will get at most half the
credit.
When testing, you can first create a text file storing the N unsorted integers (e.g. one integer per
line) and then use standard input redirection. Some sample runs can look like the following:
C:\user\Myos < integerList.txt
183 is the desired integer.
C:\user\Myos < intergerList2.txt
275 is the desired integer.
Transcribed Image Text:1. Given a list of N (N>=100) distinct integers in unsorted order, write a C or C++ or Java program to find the integer in the list that is greater than exactly 43% of the integers in the list. If N*0.43 is not exactly an integer, then take the floor. For example, if N=120, then the desired integer should be greater than exactly 51 of the integers in the list since 120*0.43=51.6. Find the integer without sorting the entire list. The input integers should be retrieved through stdin. Do not use any library classes or functions if they can achieve this functionality directly. Implement the algorithm and logic with your own code. You can add a sorting method to verify that your result is correct. However, if your program finds the desired integer through sorting alone, you will get at most half the credit. When testing, you can first create a text file storing the N unsorted integers (e.g. one integer per line) and then use standard input redirection. Some sample runs can look like the following: C:\user\Myos < integerList.txt 183 is the desired integer. C:\user\Myos < intergerList2.txt 275 is the desired integer.
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