### Sum of Natural Numbers in C-Programming

FOR LOOP #include <stdio.h> int main() { int n, i, sum = 0; printf("Enter a positive integer: "); scanf("%d",&n); for(i=1; i <= n; ++i) { sum += i; // sum …

Sum of Natural Numbers in C-Programming Read More
Skip to content
# Tag: sum of Natural numbers

### Sum of Natural Numbers in C-Programming

FOR LOOP #include <stdio.h> int main() { int n, i, sum = 0; printf("Enter a positive integer: "); scanf("%d",&n); for(i=1; i <= n; ++i) { sum += i; // sum …

Sum of Natural Numbers in C-Programming Read More