This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Introduction to Computer Science I Using C ++ CSC 1253 Louisiana State University Survey Statistics—Programming Assignment 6 This programming as- signment involves measures of central tendency like the following: arithmetic mean defined by ∑ n- 1 i =0 a i n = a + a 1 + · · · + a n- 1 n harmonic mean defined by n ∑ n- 1 i =0 1 a i = n 1 a + 1 a 1 + · · · + 1 a n- 1 median defined as the central value of the sorted array a of values if n is odd or the arithmetic mean of the two central values if n is even. mode defined as the most common value of the n values in the array a . Write a complete C ++ program using an array of structs 1 to do the following: 1. Read an arbitrary but fixed number n of input records from the text file survey.dat each containing survey results consisting of a unique integer identifier for a customer followed by a single integer rating in the range 1–10 inclusive representing that customer’s rating for a newly-marketed product. After all values have been read and stored, sort the table ofproduct....
View Full Document
- Fall '08
- Computer Science