Menu Close

Program to display 1 to ‘n’ numbers and display sum of 1 to ‘n’.

Code:

https://gist.github.com/programmingfaster0226/a99852ec7ad7a675152d7558cc352c90

Output:

Enter the numbers you want to display:5

1       2      3      4      5

the sum from 1 to 5  =15

Leave a Reply

Your email address will not be published. Required fields are marked *