Ask coding questions

← Back to all posts
Smooting the weather C++ (Not my code) size-1
Bubbleboy228
Answered by Highwayman [earned 5 cycles]
View Answer
Voters
Bubbleboy228
Comments
hotnewtop
Highwayman

From the site:

By agreement, the first and the last values will remain unchanged.

So, it skips the first value bye saying i=1, and skips the last by saying i<size-1.