Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

input3.txt contains this 5 8 8 1 5 0 6 6 5 3 4 0 6 8 5 4 9 5 8 0 4 7

input3.txt contains this

5

8

8

1

5

0

6

6

5

3

4

0

6

8

5

4

9

5

8

0

4

7

4

2

0

9

8

3

5

5

5

7

5

7

1

4

4

0

7

4

8

4

2

4

9

8

8

2

3

4

Requirements:

  • Using a Scanner read the data from the input3.txt file into an array
  • Calculate the average of these 50 numbers
  • Output the numbers 5 to a line. If the number being output is larger than the average output a > character next to it
  • Calculate how many times each number appears in the input file (how many 0s, how many 1s, )
  • Output the number of times each value appears as a simple graph. Output the number and the a * for each time it appeared in the input file on the same line. For example, if zero appeared in the file 7 times, the line for zero would look like:
    • 0 = *******

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions