Create a function to generate 100 random numbers in the range -9 to 900 and store it in a file. Create a function to read every 6th value from the file and store it in a vector. Write a function to read in the vector convert it to its absolute value

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

Using C++

 

Create a function to generate 100 random numbers in the range -9 to 900 and store it in a file. Create a function to read every 6th value from the file and store it in a vector. Write a function to read in the vector convert it to its absolute value and determine the number of digits in the number for each value in the vector. For example: -999 -> 999 = 3 digits. Write a function to store the number of digits as a character key value for that number such that 1 digit = A, 2 digits = B, 3 digits = C, 4 digits = D. For all the numbers and keys, design a flow diagram and write a function to determine the frequency of each key and determine the highest key value (most frequently occurring number of digits. For example, in the set: [23 456 7565 34 67 326 96]; keys are B C D B B C B; most frequent key value is B that occurs 4 times).

Expert Solution
steps

Step by step

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