Slide 1 Copyright 2006 by Pearson Education 1 reading: 4.1 Cumulative sum Slide 2 Copyright 2006 by Pearson Education 2 Adding many numbers Consider this code to add three…