dhyuti-n/xlcost-variable-roles huggingface dataset:
C# program:
using System ; class GFG { static int Centered_decagonal_num ( int n ) { return ( 5 * n * n - 5 * n + 1 ) ; } static int sum_Centered_decagonal_num ( int n ) { int summ = 0 ; for ( int i = 1 ; i < n + 1 ; i ++ ) { summ += Centered_decagonal_num ( i ) ; } return summ ; } public static void Main ( String [ ] args ) { int n = 5 ; Console . WriteLine ( sum_Centered_decagonal_num ( n ) ) ; } }

Accumulator variables: i, summ
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int center_octadecagon_num ( int n ) { return ( 9 * n * n - 9 * n + 1 ) ; } static int sum_center_octadecagon_num ( int n ) { int summ = 0 ; for ( int i = 1 ; i < n + 1 ; i ++ ) { summ += center_octadecagon_num ( i ) ; } return summ ; } public static void Main ( String [ ] args ) { int n = 3 ; Console . WriteLine ( sum_center_octadecagon_num ( n ) ) ; } }

Accumulator variables: i, summ
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int Centered_Pentadecagonal_num ( int n ) { return ( 15 * n * n - 15 * n + 2 ) / 2 ; } static int sum_Centered_Pentadecagonal_num ( int n ) { int summ = 0 ; for ( int i = 1 ; i < n + 1 ; i ++ ) { summ += Centered_Pentadecagonal_num ( i ) ; } return summ ; } public static void Main ( String [ ] args ) { int n = 5 ; Console . WriteLine ( sum_Centered_Pentadecagonal_num ( n ) ) ; } }

Accumulator variables: i, summ
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { public static bool isoctagonal ( int N ) { double n = ( 2 + Math . Sqrt ( 12 * N + 4 ) ) / 6 ; return ( n - ( int ) n ) == 0 ; } public static void Main ( String [ ] args ) { int N = 8 ; if ( isoctagonal ( N ) ) { Console . WriteLine ( " Yes " ) ; } else { Console . WriteLine ( " No " ) ; } } }

Class/struct names: GFG
C# program:
using System ; class GFG { public static bool isPentadecagon ( int N ) { double n = ( 11 + Math . Sqrt ( 104 * N + 121 ) ) / 26 ; return ( n - ( int ) n ) == 0 ; } public static void Main ( String [ ] args ) { int N = 15 ; if ( isPentadecagon ( N ) ) { Console . WriteLine ( " Yes " ) ; } else { Console . WriteLine ( " No " ) ; } } }

Class/struct names: GFG
C# program:
using System ; class GFG { public static bool istetradecagonal ( int N ) { double n = ( 10 + Math . Sqrt ( 96 * N + 100 ) ) / 24 ; return ( n - ( int ) n ) == 0 ; } static public void Main ( ) { int N = 11 ; if ( istetradecagonal ( N ) ) { Console . Write ( " Yes " ) ; } else { Console . Write ( " No " ) ; } } }

Class/struct names: GFG
C# program:
using System ; class GFG { public static int Icosagonal_num ( int n ) { return ( 18 * n * n - 16 * n ) / 2 ; } public static int sum_Icosagonal_num ( int n ) { int summ = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { summ += Icosagonal_num ( i ) ; } return summ ; } public static void Main ( ) { int n = 5 ; Console . WriteLine ( sum_Icosagonal_num ( n ) ) ; } }

Accumulator variables: i, summ
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int Centered_Pentagonal_num ( int n ) { return ( 5 * n * n - 5 * n + 2 ) / 2 ; } static int sum_Centered_Pentagonal_num ( int n ) { int summ = 0 ; for ( int i = 1 ; i < n + 1 ; i ++ ) { summ += Centered_Pentagonal_num ( i ) ; } return summ ; } public static void Main ( String [ ] args ) { int n = 5 ; Console . Write ( ( sum_Centered_Pentagonal_num ( n ) ) ) ; } }

Accumulator variables: i, summ
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { public static int Centered_tridecagonal_num ( int n ) { return ( 13 * n * ( n - 1 ) + 2 ) / 2 ; } public static int sum_Centered_tridecagonal_num ( int n ) { int summ = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { summ += Centered_tridecagonal_num ( i ) ; } return summ ; } public static void Main ( ) { int n = 5 ; Console . WriteLine ( sum_Centered_tridecagonal_num ( n ) ) ; } }

Accumulator variables: i, summ
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isConcentrichexagonal ( int N ) { float n = ( float ) Math . Sqrt ( ( 2 * N ) / 3 ) ; return ( n - ( int ) n ) == 0 ; } public static void Main ( ) { int N = 6 ; if ( isConcentrichexagonal ( N ) ) { Console . Write ( " Yes " ) ; } else { Console . Write ( " No " ) ; } } }

Class/struct names: GFG
C# program:
using System ; using System . Linq ; class GFG { static bool [ ] Prime ; static void computePrime ( int N ) { Prime = new bool [ N + 1 ] ; for ( int i = 0 ; i <= N ; i ++ ) { Prime [ i ] = true ; } Prime [ 0 ] = Prime [ 1 ] = false ; for ( int i = 2 ; i * i <= N ; i ++ ) { if ( Prime [ i ] ) { for ( int j = i * i ; j < N ; j += i ) { Prime [ j ] = false ; } } } } static int countSexyPairs ( int [ ] arr , int n ) { int maxE = arr . Max ( ) ; computePrime ( maxE ) ; int count = 0 ; int [ ] freq = new int [ maxE + 1 ] ; for ( int i = 0 ; i < n ; i ++ ) { freq [ arr [ i ] ] ++ ; } Array . Sort ( arr ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( Prime [ arr [ i ] ] ) { if ( arr [ i ] + 6 < freq . Length && freq [ arr [ i ] + 6 ] > 0 && Prime [ arr [ i ] + 6 ] ) { count ++ ; } } } return count ; } public static void Main ( String [ ] args ) { int [ ] arr = { 6 , 7 , 5 , 11 , 13 } ; int n = arr . Length ; Console . Write ( countSexyPairs ( arr , n ) ) ; } }

Index/key variables: i, j
Accumulator variables: count, i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static void countWays ( int n ) { if ( n <= 2 ) { Console . WriteLine ( " - 1" ) ; } else { int ans = ( n - 1 ) * ( n - 2 ) / 2 ; Console . WriteLine ( ans ) ; } } static void Main ( ) { int N = 5 ; countWays ( N ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { public static bool isPowerOfTwo ( int n ) { return ( Math . Ceiling ( Math . Log ( n ) / Math . Log ( 2 ) ) == Math . Floor ( Math . Log ( n ) / Math . Log ( 2 ) ) ) ; } public static void Main ( String [ ] args ) { int N = 8 ; if ( isPowerOfTwo ( N ) ) { Console . WriteLine ( " Yes " ) ; } else { Console . WriteLine ( " No " ) ; } } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int count_pairs ( int x ) { int ans = 1 ; while ( x > 0 ) { if ( x % 2 == 1 ) ans = ans * 3 ; x = x / 2 ; } return ans ; } public static void Main ( String [ ] args ) { int X = 6 ; Console . Write ( count_pairs ( X ) + " STRNEWLINE " ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void kthNonDivisible ( int N , int K ) { int L = 1 ; int H = Int32 . MaxValue ; int ans = 0 ; while ( L <= H ) { int mid = ( L + H ) / 2 ; int sol = mid - mid / N ; if ( sol > K ) { H = mid - 1 ; } else if ( sol < K ) { L = mid + 1 ; } else { ans = mid ; H = mid - 1 ; } } Console . Write ( ans ) ; } static void Main ( ) { int N = 3 ; int K = 7 ; kthNonDivisible ( N , K ) ; } }

Class/struct names: GFG
C# program:
using System ; public class GFG { static void printPair ( int n ) { Console . Write ( 1 + " ▁ " + ( n - 1 ) ) ; } public static void Main ( String [ ] args ) { int n = 14 ; printPair ( n ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static bool isAutoBiographyNum ( int number ) { int count = 0 , position , size , digit ; string NUM ; NUM = number . ToString ( ) ; size = NUM . Length ; for ( int i = 0 ; i < size ; i ++ ) { position = NUM [ i ] - '0' ; count = 0 ; for ( int j = 0 ; j < size ; j ++ ) { digit = NUM [ j ] - '0' ; if ( digit == i ) count ++ ; } if ( position != count ) return false ; } return true ; } static int checkArray ( int [ ] arr , int n ) { int current_length = 0 ; int max_length = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( isAutoBiographyNum ( arr [ i ] ) == true ) { current_length ++ ; } else { current_length = 0 ; } max_length = Math . Max ( max_length , current_length ) ; } return max_length ; } public static void Main ( string [ ] args ) { int [ ] arr = { 21200 , 1 , 1303 , 1210 , 2020 } ; int n = arr . Length ; Console . WriteLine ( checkArray ( arr , n ) ) ; } }

Index/key variables: i, j
Accumulator variables: count, current_length, i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { public class pair { public int first , second ; public pair ( int first , int second ) { this . first = first ; this . second = second ; } } static int __gcd ( int a , int b ) { return b == 0 ? a : __gcd ( b , a % b ) ; } static void sumOfSquares ( int n , List < pair > vp ) { for ( int i = 1 ; i <= Math . Sqrt ( n ) ; i ++ ) { int h = n - i * i , h1 = ( int ) Math . Sqrt ( h ) ; if ( h1 * h1 == h ) { int a = Math . Max ( h1 , i ) , b = Math . Min ( h1 , i ) ; if ( vp . Count == 1 && a != vp [ 0 ] . first ) vp . Add ( new pair ( a , b ) ) ; if ( vp . Count == 0 ) vp . Add ( new pair ( a , b ) ) ; if ( vp . Count == 2 ) return ; } } } static void findFactors ( int n ) { List < pair > vp = new List < pair > ( ) ; sumOfSquares ( n , vp ) ; if ( vp . Count != 2 ) Console . Write ( " Factors ▁ Not ▁ Possible " ) ; int a , b , c , d ; a = vp [ 0 ] . first ; b = vp [ 0 ] . second ; c = vp [ 1 ] . first ; d = vp [ 1 ] . second ; if ( a < c ) { int t = a ; a = c ; c = t ; t = b ; b = d ; d = t ; } int k , h , l , m ; k = __gcd ( a - c , d - b ) ; h = __gcd ( a + c , d + b ) ; l = ( a - c ) / k ; m = ( d - b ) / k ; Console . Write ( " a ▁ = ▁ " + a + " TABSYMBOL TABSYMBOL ( A ) ▁ a ▁ - ▁ c ▁ = ▁ " + ( a - c ) + " TABSYMBOL TABSYMBOL k ▁ = ▁ gcd [ A , ▁ C ] ▁ = ▁ " + k + " STRNEWLINE " ) ; Console . Write ( " b ▁ = ▁ " + b + " TABSYMBOL TABSYMBOL ( B ) ▁ a ▁ + ▁ c ▁ = ▁ " + ( a + c ) + " TABSYMBOL TABSYMBOL h ▁ = ▁ gcd [ B , ▁ D ] ▁ = ▁ " + h + " STRNEWLINE " ) ; Console . Write ( " c ▁ = ▁ " + c + " TABSYMBOL TABSYMBOL ( C ) ▁ d ▁ - ▁ b ▁ = ▁ " + ( d - b ) + " TABSYMBOL TABSYMBOL l ▁ = ▁ A / k ▁ = ▁ " + l + " STRNEWLINE " ) ; Console . Write ( " d ▁ = ▁ " + d + " TABSYMBOL TABSYMBOL ( D ) ▁ d ▁ + ▁ b ▁ = ▁ " + ( d + b ) + " TABSYMBOL TABSYMBOL m ▁ = ▁ c / k ▁ = ▁ " + m + " STRNEWLINE " ) ; if ( k % 2 == 0 && h % 2 == 0 ) { k = k / 2 ; h = h / 2 ; Console . Write ( " Factors ▁ are : ▁ " + ( ( k ) * ( k ) + ( h ) * ( h ) ) + " ▁ " + ( l * l + m * m ) + " STRNEWLINE " ) ; } else { l = l / 2 ; m = m / 2 ; Console . Write ( " Factors ▁ are : ▁ " + ( ( l ) * ( l ) + ( m ) * ( m ) ) + " ▁ " + ( k * k + h * h ) + " STRNEWLINE " ) ; } } public static void Main ( String [ ] args ) { int n = 100000 ; findFactors ( n ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG, pair
C# program:
using System ; using System . Collections . Generic ; class GFG { static readonly int MAX = 100000 ; static List < int > [ ] graph = new List < int > [ MAX + 1 ] ; static bool [ ] Prime = new bool [ MAX + 1 ] ; static int [ ] height = new int [ MAX + 1 ] ; static void SieveOfEratosthenes ( ) { int i , j ; Prime [ 0 ] = Prime [ 1 ] = false ; for ( i = 2 ; i * i <= MAX ; i ++ ) { if ( Prime [ i ] ) { for ( j = 2 * i ; j < MAX ; j += i ) { Prime [ j ] = false ; } } } } static void dfs ( int node , int parent , int h ) { height [ node ] = h ; foreach ( int to in graph [ node ] ) { if ( to == parent ) continue ; dfs ( to , node , h + 1 ) ; } } static void primeHeightNode ( int N ) { SieveOfEratosthenes ( ) ; for ( int i = 1 ; i <= N ; i ++ ) { if ( Prime [ height [ i ] ] ) { Console . Write ( i + " ▁ " ) ; } } } public static void Main ( String [ ] args ) { int N = 5 ; for ( int i = 0 ; i < Prime . Length ; i ++ ) Prime [ i ] = true ; for ( int i = 0 ; i < graph . Length ; i ++ ) graph [ i ] = new List < int > ( ) ; graph [ 1 ] . Add ( 2 ) ; graph [ 1 ] . Add ( 3 ) ; graph [ 2 ] . Add ( 4 ) ; graph [ 2 ] . Add ( 5 ) ; dfs ( 1 , 1 , 0 ) ; primeHeightNode ( N ) ; } }

Index/key variables: i, j, node
Accumulator variables: i, j
Iterator variables: i, j, to
Class/struct names: GFG
C# program:
using System ; class GFG { public static int reverse ( int a ) { int rev = 0 ; while ( a != 0 ) { int r = a % 10 ; rev = rev * 10 + r ; a = a / 10 ; } return ( rev ) ; } public static int prime ( int a ) { int k = 0 ; for ( int i = 2 ; i < a ; i ++ ) { if ( a % i == 0 ) { k = 1 ; break ; } } if ( k == 1 ) { return ( 0 ) ; } else { return ( 1 ) ; } } public static int adam ( int a ) { int r1 = reverse ( a ) ; int s1 = a * a ; int s2 = r1 * r1 ; int r2 = reverse ( s2 ) ; if ( s1 == r2 ) { return ( 1 ) ; } else { return ( 0 ) ; } } public static void find ( int m , int n ) { if ( m > n ) { Console . WriteLine ( " INVALID ▁ INPUT " ) ; } else { for ( int i = m ; i <= n ; i ++ ) { int l = prime ( i ) ; int k = adam ( i ) ; if ( ( l == 1 ) && ( k == 1 ) ) { Console . Write ( i + " TABSYMBOL " ) ; } } } } public static void Main ( String [ ] args ) { int L = 5 , R = 100 ; find ( L , R ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int sumDig ( int n ) { int s = 0 ; while ( n != 0 ) { s = s + ( n % 10 ) ; n = n / 10 ; } return s ; } static bool Pec ( int n ) { int dup = n ; int dig = sumDig ( n ) ; if ( dig * 3 == dup ) return true ; else return false ; } public static void Main ( ) { int n = 36 ; if ( Pec ( n ) == true ) Console . Write ( " Yes " ) ; else Console . Write ( " No " ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int digit_sum ( int n ) { int sum = 0 , m ; while ( n > 0 ) { m = n % 10 ; sum = sum + m ; n = n / 10 ; } return ( sum ) ; } static int reverse ( int n ) { int r = 0 ; while ( n != 0 ) { r = r * 10 ; r = r + n % 10 ; n = n / 10 ; } return ( r ) ; } static void operation ( int n ) { int i = 1 , a , count = 0 , r ; while ( count < n ) { a = digit_sum ( i ) ; r = reverse ( i ) ; if ( i % a == 0 && r % a == 0 ) { Console . Write ( i + " ▁ " ) ; count ++ ; i ++ ; } else i ++ ; } } public static void Main ( ) { int n = 10 ; operation ( n ) ; } }

Accumulator variables: count, i
Class/struct names: GFG
C# program:
using System ; class GFG { static void createSets ( int N ) { if ( N <= 2 ) { Console . WriteLine ( " - 1" ) ; return ; } for ( int i = 2 ; i <= N ; i += 2 ) Console . Write ( i + " ▁ " ) ; Console . Write ( " STRNEWLINE " ) ; for ( int i = 1 ; i <= N ; i += 2 ) { Console . Write ( i + " ▁ " ) ; } } public static void Main ( String [ ] args ) { int N = 6 ; createSets ( N ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static int ans = 0 ; static List < int > [ ] graph = new List < int > [ 100 ] ; static int [ ] weight = new int [ 100 ] ; static bool isPowerful ( int n ) { while ( n % 2 == 0 ) { int power = 0 ; while ( n % 2 == 0 ) { n /= 2 ; power ++ ; } if ( power == 1 ) return false ; } for ( int factor = 3 ; factor <= Math . Sqrt ( n ) ; factor += 2 ) { int power = 0 ; while ( n % factor == 0 ) { n = n / factor ; power ++ ; } if ( power == 1 ) return false ; } return ( n == 1 ) ; } static void dfs ( int node , int parent ) { if ( isPowerful ( weight [ node ] ) ) ans += 1 ; foreach ( int to in graph [ node ] ) { if ( to == parent ) continue ; dfs ( to , node ) ; } } public static void Main ( String [ ] args ) { for ( int i = 0 ; i < graph . Length ; i ++ ) graph [ i ] = new List < int > ( ) ; weight [ 1 ] = 5 ; weight [ 2 ] = 10 ; weight [ 3 ] = 11 ; weight [ 4 ] = 8 ; weight [ 5 ] = 6 ; graph [ 1 ] . Add ( 2 ) ; graph [ 2 ] . Add ( 3 ) ; graph [ 2 ] . Add ( 4 ) ; graph [ 1 ] . Add ( 5 ) ; dfs ( 1 , 1 ) ; Console . Write ( ans ) ; } }

Index/key variables: i, node
Accumulator variables: ans, factor, i, n, power
Iterator variables: factor, i, to
Class/struct names: GFG
C# program:
using System ; class GFG { static int CountWays ( int N , int M ) { int count = 1 ; count = ( int ) Math . Pow ( 3 , M + N ) ; count *= ( int ) Math . Pow ( 2 , M * N ) ; return count ; } static void Main ( ) { int N = 3 ; int M = 2 ; Console . Write ( CountWays ( N , M ) ) ; } }

Accumulator variables: count
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static void findNthNumber ( int N ) { int [ ] arr = new int [ N + 1 ] ; Queue < int > q = new Queue < int > ( ) ; for ( int i = 1 ; i <= 9 ; i ++ ) q . Enqueue ( i ) ; for ( int i = 1 ; i <= N ; i ++ ) { arr [ i ] = q . Peek ( ) ; q . Dequeue ( ) ; if ( arr [ i ] % 10 != 0 ) q . Enqueue ( arr [ i ] * 10 + arr [ i ] % 10 - 1 ) ; q . Enqueue ( arr [ i ] * 10 + arr [ i ] % 10 ) ; if ( arr [ i ] % 10 != 9 ) q . Enqueue ( arr [ i ] * 10 + arr [ i ] % 10 + 1 ) ; } Console . WriteLine ( arr [ N ] ) ; } public static void Main ( String [ ] args ) { int N = 21 ; findNthNumber ( N ) ; } }

Index/key variables: N, i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static void findUniqueElements ( int [ ] arr , int N , int K ) { HashSet < int > s = new HashSet < int > ( ) ; for ( int i = 0 ; i < N ; i ++ ) s . Add ( arr [ i ] ) ; int arr_sum = 0 ; for ( int i = 0 ; i < N ; i ++ ) arr_sum += arr [ i ] ; int set_sum = 0 ; foreach ( int i in s ) set_sum += i ; Console . WriteLine ( ( K * set_sum - arr_sum ) / ( K - 1 ) ) ; } public static void Main ( String [ ] args ) { int [ ] arr = { 12 , 1 , 12 , 3 , 12 , 1 , 1 , 2 , 3 , 2 , 2 , 3 , 7 } ; int N = arr . Length ; int K = 3 ; findUniqueElements ( arr , N , K ) ; } }

Index/key variables: i
Accumulator variables: arr_sum, i, set_sum
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void findEquation ( int a , int b , int c ) { int X = ( a + b + c ) ; int Y = ( a * b ) + ( b * c ) + ( c * a ) ; int Z = a * b * c ; Console . Write ( " x ^ 3 ▁ - ▁ " + X + " x ^ 2 ▁ + ▁ " + Y + " x ▁ - ▁ " + Z + " ▁ = ▁ 0" ) ; } public static void Main ( ) { int a = 5 , b = 2 , c = 3 ; findEquation ( a , b , c ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double dydx ( double x , double y ) { return ( x - y ) / 2 ; } static double Gill ( double x0 , double y0 , double x , double h ) { int n = ( int ) ( ( x - x0 ) / h ) ; double k1 , k2 , k3 , k4 ; double y = y0 ; for ( int i = 1 ; i <= n ; i ++ ) { k1 = h * dydx ( x0 , y ) ; k2 = h * dydx ( x0 + 0.5 * h , y + 0.5 * k1 ) ; k3 = h * dydx ( x0 + 0.5 * h , y + 0.5 * ( - 1 + Math . Sqrt ( 2 ) ) * k1 + k2 * ( 1 - 0.5 * Math . Sqrt ( 2 ) ) ) ; k4 = h * dydx ( x0 + h , y - ( 0.5 * Math . Sqrt ( 2 ) ) * k2 + k3 * ( 1 + 0.5 * Math . Sqrt ( 2 ) ) ) ; y = y + ( 1.0 / 6 ) * ( k1 + ( 2 - Math . Sqrt ( 2 ) ) * k2 + ( 2 + Math . Sqrt ( 2 ) ) * k3 + k4 ) ; x0 = x0 + h ; } return y ; } public static void Main ( String [ ] args ) { double x0 = 0 , y = 3.0 , x = 5.0 , h = 0.2 ; Console . Write ( " y ( x ) ▁ = ▁ { 0 : F6 } " , Gill ( x0 , y , x , h ) ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void PrintReverseOrder ( int N ) { for ( int i = N ; i > 0 ; i -- ) Console . Write ( i + " ▁ " ) ; } public static void Main ( String [ ] args ) { int N = 5 ; PrintReverseOrder ( N ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int findAns ( int a , int b , int n ) { int lcm = ( a * b ) / __gcd ( a , b ) ; int multiples = ( n / lcm ) + 1 ; int answer = Math . Max ( a , b ) * multiples ; int lastvalue = lcm * ( n / lcm ) + Math . Max ( a , b ) ; if ( lastvalue > n ) { answer = answer - ( lastvalue - n - 1 ) ; } return answer ; } static int __gcd ( int a , int b ) { return b == 0 ? a : __gcd ( b , a % b ) ; } public static void Main ( String [ ] args ) { int a = 1 , b = 13 , n = 500 ; Console . Write ( findAns ( a , b , n ) + " STRNEWLINE " ) ; } }

Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static Double ArithmeticMean ( Double A , Double B ) { return ( A + B ) / 2 ; } static Double HarmonicMean ( Double A , Double B ) { return ( 2 * A * B ) / ( A + B ) ; } static void CheckArithmeticHarmonic ( Double [ ] arr , Double A , Double B , int N ) { Double AM = ArithmeticMean ( A , B ) ; Double HM = HarmonicMean ( A , B ) ; Dictionary < Double , int > Hash = new Dictionary < Double , int > ( ) ; for ( int i = 0 ; i < N ; i ++ ) { Hash [ arr [ i ] ] = 1 ; } if ( Hash . ContainsKey ( A ) && Hash . ContainsKey ( B ) ) { if ( Hash . ContainsKey ( AM ) && Hash . ContainsKey ( HM ) ) { Console . Write ( " GM ▁ = ▁ " ) ; Console . Write ( Math . Round ( Math . Sqrt ( AM * HM ) , 2 ) ) ; } else { Console . WriteLine ( " AM ▁ and ▁ HM ▁ not ▁ found " ) ; } } else { Console . WriteLine ( " numbers ▁ not ▁ found " ) ; } } public static void Main ( ) { Double [ ] arr = { 1.0 , 2.0 , 2.5 , 3.0 , 4.0 , 4.5 , 5.0 , 6.0 } ; int N = ( arr . Length ) ; Double A = 3.0 ; Double B = 6.0 ; CheckArithmeticHarmonic ( arr , A , B , N ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void movesRequired ( int a , int b ) { int total_moves = a % b ; Console . Write ( total_moves ) ; } public static void Main ( String [ ] args ) { int A = 10 , B = 3 ; movesRequired ( A , B ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void PythagoreanTriplet ( int n ) { int flag = 0 ; for ( int a = 1 ; a < n ; a ++ ) { int b = ( n * n - 2 * n * a ) / ( 2 * n - 2 * a ) ; int c = n - a - b ; if ( a * a + b * b == c * c && b > 0 && c > 0 ) { Console . Write ( a + " ▁ " + b + " ▁ " + c ) ; flag = 1 ; break ; } } if ( flag == 0 ) { Console . Write ( " - 1" ) ; } return ; } public static void Main ( String [ ] args ) { int N = 12 ; PythagoreanTriplet ( N ) ; } }

Accumulator variables: a
Iterator variables: a
Class/struct names: GFG
C# program:
using System ; class GFG { static bool check ( int X , int K ) { int prime , temp , sqr , i ; prime = 0 ; temp = X ; sqr = Convert . ToInt32 ( Math . Sqrt ( X ) ) ; for ( i = 2 ; i <= sqr ; i ++ ) { while ( temp % i == 0 ) { temp = temp / i ; prime ++ ; } } if ( temp > 2 ) prime ++ ; if ( X == 1 ) return false ; if ( prime == 1 && K == 1 ) return true ; else if ( prime >= K ) return true ; else return false ; } static public void Main ( ) { int X , K ; X = 4 ; K = 2 ; if ( check ( X , K ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }

Accumulator variables: i, prime
Iterator variables: i
Class/struct names: GFG