c-thumb

C Program to find sum of 1 to n natural numbers!

Hello students and self-learners, here is another interesting program for you to learn the basics of C programming.

In this post, you are going to learn how to print natural number from 1 to n using C programming language.

 

It’s a very simple program. First, we are getting the value of n from the user. Then using for loop we are calculating the values from 1 to n. 

The output of the above program will be:

Enjoy learning something new every day!

Related Posts

Leave a Reply