Sum of the sequence 2 , 22 , 222 , ... ... ... | C # Code for Sum of the sequence 2 , 22 , 222 , ... ; Function which return the the sum of series ; Driver Code
using System ; class GFG { static double sumOfSeries ( int n ) { return 0.0246 * ( Math . Pow ( 10 , n ) - 1 - ( 9 * n ) ) ; } public static void Main ( ) { int n = 3 ; Console . Write ( sumOfSeries ( n ) ) ; } }