0
我需要計算數組中輸入值的平均值。目前的計算是錯誤的,我不知道如何解決它。我已經嘗試過使用for語句,但它再次計算不正確,給了我錯誤的平均值。我會很感激你能給予的任何幫助。在不使用數組類的情況下在數組中尋找平均值
foreach (int scores in bowlerScores)// a for loop to continue to process the scores
{//by moving through the array and adding each individual score
averageScore += (scores/ SCORE_COUNT);
編輯:剛纔看到INT成績,改變了一倍
你會如何平均在一張紙上寫下的數字?忘記編程,你的算法是什麼? – 2014-11-02 02:58:34