as6 - Introduction to Computer Science I Using C ++ CSC...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Introduction to Computer Science I Using C ++ CSC 1253 Louisiana State University Survey StatisticsProgramming 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 110 inclusive representing that customers rating for a newly-marketed product. After all values have been read and stored, sort the table ofproduct....
View Full Document

Page1 / 3

as6 - Introduction to Computer Science I Using C ++ CSC...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online