The sum of the first n natural number = n * (n+1) / 2, for n a natural number.
For example, you want to calculate the sum and average of any five numbers entered by the user. i.e., If you want to calculate the sum and average or percentage of multiple user-entered numbers, then please refer to the following program.