About this document
Sum of Natural Numbers in C Code by Kartikey Rai is a document available to read on EtoBox.
This C program calculates the sum of the first n natural numbers using a formula and prints the numbers and sum. It takes the input n, calculates the sum as n(n+1)/2, prints the numbers from 1 to n with + symbols between them except for the last one, and finally prints the last number and the sum.
- Author
- Kartikey Rai
- Language
- EN