Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help writing the following C++ code? Qbiective: Write a program that will input values from a file into a one-dimensional array, locate the maximum value,

Help writing the following C++ code?
image text in transcribed
image text in transcribed
Qbiective: Write a program that will input values from a file into a one-dimensional array, locate the maximum value, calculate new values and store them into a second one-dimensional array. Reference: Chapter 7 of the textbook and lecture notes Problem: Write a program that will normalize the 20 floating-point numbers saved in array stats. To normalize an array of numbers, first find the largest number in the array and then divide each number in the array by the largest number. Each resulting value will then be between 0 and 1. Store the resulting values in a second array, normal A. Read in the 20 values from a data file located on Canvas called stats.txt. This is an EOF data file. Be sure to keep track of how many values you read in, in case it is less than your maximum number allowed. This is also helpful for when you work with counter-control or trailer-signal files. Output the results to the screen in a neat and readable format. Include the values of the original array and the normalized array. As well as the maximum value used for the normalization calculation B. Upload your source code and a copy of the output to Canvas. Hints .(1) Read in the data and echo it out (2) then locate maximum value (3) then create normalized array and (4) last step, output results in a neat and readable format

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions

Question

Enhance the basic quality of your voice.

Answered: 1 week ago

Question

Describe the features of and process used by a writing team.

Answered: 1 week ago