C Program to Calculate the Sum of Natural Numbers

To compute the sum of natural numbers from 1 to n (entered by the user), loops can be used. You will learn how to use for loop and while loop to solve this problem.

To understand this example, you should have the knowledge of following C programming topics:

Natural numbers