How to write a C Program for in C Programming Language ?
Solution For C Program :
/*C Program: for*/
#include <stdio.h>
int main(){
int n;
scanf("%d", &n);
int sum = 0;
int i;
for( i = 1 ; i <= n ; i++ ){
sum += i;
printf("%d", i);
if( i != n ){
printf("+");
}
}
printf(" = %d", sum);
return 0;
}