C Program to Print First n Natural Numbers and their Sum

Here you will get C program to print first n natural numbers and their sum.

 

Output

Enter the value of n:7

1
2
3
4
5
6
7

Sum of first n natural numbers is:28

" data-link="https://twitter.com/intent/tweet?text=C+Program+to+Print+First+n+Natural+Numbers+and+their+Sum&url=https%3A%2F%2Fwww.thecrazyprogrammer.com%2F2012%2F05%2Fc-program-to-print-first-n-natural.html&via=">">Tweet
4 Shares

5 thoughts on “C Program to Print First n Natural Numbers and their Sum

    1. Neeraj Mishra

      For example you have entered 5, then the sum will be 1+2+3+4+5 = 15

      So the output will be:
      1
      2
      3
      4
      5

      Sum of first n natural numbers is:15

      Reply

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.