text: Program to print triangular number series till n | C Program to find Triangular Number Series ; Function to find triangular number ; For each iteration increase j by 1 and add it into k ; Increasing j by 1 ; Add value of j into k and update k ; Driven Function
code: #include <stdio.h> NEW_LINE void triangular_series ( int n ) { int i , j = 1 , k = 1 ; for ( i = 1 ; i <= n ; i ++ ) { printf ( " ▁ % d ▁ " , k ) ; j = j + 1 ; k = k + j ; } } int main ( ) { int n = 5 ; triangular_series ( n ) ; return 0 ; }