Program to print triangular number series till n | C # program to print triangular number series till n ; Function to find triangular number ; Driver Code
using System ; class GFG { static void triangular_series ( int n ) { for ( int i = 1 ; i <= n ; i ++ ) Console . Write ( i * ( i + 1 ) / 2 + " ▁ " ) ; } public static void Main ( ) { int n = 5 ; triangular_series ( n ) ; } }