Forum: C++ Sep 1st, 2006 |
| Replies: 9 Views: 6,017 For a while loop, the iterator (typically int i) is incremented at the end of the loop. Then, you can use i + 1 as your denominator in calculating the average, and do the cumulative sum of the... |
Forum: C++ Sep 1st, 2006 |
| Replies: 9 Views: 6,017 Sounds like you could use an array to store all those numbers, then have an int sum that you'd use to hold the cumulative sum of the temperatures as you looped through the array.
Something like... |