Triangular Matchstick Number | C # program to find X - th triangular matchstick number ; Driver code
using System ; class GFG { static int numberOfSticks ( int x ) { return ( 3 * x * ( x + 1 ) ) / 2 ; } public static void Main ( ) { Console . Write ( numberOfSticks ( 7 ) ) ; } }