Qualification of runners

Oct 31, 2013 10:03


// Runner times
var Eugene = [9.6,10.6,11.2,10.3,11.5];
var Sveta = [10.6,11.2,9.4,12.3,10.1];
var Anton = [12.2,11.8,12.5,10.9,11.1];
//the function calculateAverage
var calculateAverage = function(raceTimes){
var totalTime = 0;
var averageTime;
for(i=0; i
totalTime = totalTime+raceTimes[i];
averageTime = totalTime/raceTimes.length;
}
return averageTime;
};
var ( Read more... )

Leave a comment

Comments 1

tymofii November 23 2013, 12:10:54 UTC
так и кто быстрее?)

Reply


Leave a comment

Up