|
From: Smith, J. N. <jn...@ut...> - 2003-06-11 12:14:25
|
Take the arbitrary (non median) dot product of the weights and the scores. Of course, you've defined both "weights" and an "average": this isn't really kosher statistically unless you're assuming the weights represent some sort of oddball fully non-parametric method. I'd suggest Kernighan & Ritchie for C, Stroustrup 2nd Ed. for C++, and Rosenblatt et. al. for an excellent treatment of fully and partially non-parametric and "normal" [that's a math joke] numerical statistics and partial differential equations. -j. -----Original Message----- From: Liezel Joubert [mailto:jou...@ya...] Sent: Wednesday, June 11, 2003 2:15 AM To: dev...@li... Subject: [Dev-C++] Urgent help needed! Hi there, can anyone help with this question? Write a program that computes final averages for a set of grades. The program reads the grades from a file called Scores.dat. The file scores.dat begins with a header line followed by a set of scores for each student. The format of the header line is n weight1 weight2 ... weightn where n is the number of scores for each student and weight is the weight of the score. The header line is followed by grades for each student. The format of a grade line is name score1 score2.... scoren where name is the last name of the student and score is the score. Allscores must be between 0 and 100. The program reads the file score.dat and writes a file called average.dat that has the average computed in it. _____ Do you Yahoo!? Free online <http://us.rd.yahoo.com/mail_us/tag/*http://calendar.yahoo.com> calendar with sync to Outlook(TM). |