Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please use the programming language of C. Thank you. 4. Write a program, maxmin.c, which uses two functions, readvalues and range, to find the maximum
Please use the programming language of C. Thank you.
4. Write a program, maxmin.c, which uses two functions, readvalues and range, to find the maximum and minimum of a set of floats stored in the file samplesin.txt. You can assume that the number of values in the input file is less than 100. Your main must use the following steps: open the two files samplesin.txt and maxminout.txt call the function readvalues which reads the values from samplesin.txt into the array x and returns the value of n (number of values in the file) call the function range which computes the maximum and minimum values found in the array x write the maximum and minimum values to the file maxminout.txt Your output file should look like: There are 80 values in the array The maximum value in the array is 63.605999 The minimum value in the array is 4.808900Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started