Fill in the C++ Code.

profiletechstudent28
triangle_puzzle.docx

TRIANGLE PUZZLE

By starting at the top of the triangle below, and moving to adjacent numbers on the row below,

the maximum total from top to bottom is 27.

5

9 6

4 6 8

0 7 1 5

i.e. 5 + 9 + 6 + 7 = 27.

Write a program to find the maximum total from top to bottom from data input from a text file

representing the triangle.

Input

In triangle.txt is a text file containing a triangle with 100 rows. Use this file.

Output

Output the 100 numbers along the “maximum path”, and then the value of the sum of those

numbers, “The value of the maximum sum is: _________”