Advertisement
akosiraff

Array File C++

May 6th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1.  
  2. Download: http://solutionzip.com/downloads/array-file-c/
  3. Write a C++ program that reads data from a file into an integer array that will hold a maximum of 100 components. Write the following void or value-returning functions:
  4. a. initialize all elements of the array to zero
  5. b. read the data from a file and store it in the array
  6. c. find the index of the component that holds the smallest value
  7. d. find the average value stored in the array
  8. e. print all of the elements in the array
  9. f. print the index of the smallest value, the smallest value, the average and all of the components that are greater than the average (Make sure that all of the values printed are properly labeled.)
  10. Don’t forget to put the statement in your program.
  11. Save a copy of the program and the output from data1.txt and data2.txt
  12.  
  13. Download: http://solutionzip.com/downloads/array-file-c/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement