Write a complete C++ program that does the following. (Programs that correctly carry out some of the tasks will receive partial credit.)
a. It asks the user to enter a positive integer.
b. The program reads a value n entered by the user. If the value is not legal, the program terminates.
c. The program prints a table with n lines of output. On output line number x the program should list the numbers from 1 to x together with their sum.