الصفحة الرئيسيةC programs C Program to Calculate the Sum of Natural Numbers byAjay Kadtan •أغسطس 03, 2019 0 Program:#include<stdio.h> main() { int i,n,sum=0; printf("Enter a number: "); scanf("%d",&n); for(i=0;i<=n;i++) { sum=sum+i; } printf("%d",sum); } Output: Tags: C programs Facebook Twitter