dhyuti-n/xlcost-variable-roles huggingface dataset:
C# program:
using System ; using System . Collections . Generic ; class GFG { static int MAX = 10000 ; static HashSet < int > s = new HashSet < int > ( ) ; static void SieveOfEratosthenes ( ) { Boolean [ ] prime = new Boolean [ MAX ] ; for ( int p = 0 ; p < MAX ; p ++ ) prime [ p ] = true ; prime [ 0 ] = false ; prime [ 1 ] = false ; for ( int p = 2 ; p * p < MAX ; p ++ ) { if ( prime [ p ] == true ) { for ( int i = p * 2 ; i < MAX ; i += p ) prime [ i ] = false ; } } int product = 1 ; for ( int p = 2 ; p < MAX ; p ++ ) { if ( prime [ p ] ) { product = product * p ; s . Add ( product + 1 ) ; } } } static Boolean isEuclid ( int n ) { if ( s . Contains ( n ) ) return true ; else return false ; } public static void Main ( String [ ] args ) { SieveOfEratosthenes ( ) ; int n = 31 ; if ( isEuclid ( n ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; n = 42 ; if ( isEuclid ( n ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }

Index/key variables: MAX, i, p
Accumulator variables: i, p
Iterator variables: i, p
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isPrime ( int n ) { if ( n <= 1 ) return false ; if ( n <= 3 ) return true ; if ( n % 2 == 0 n % 3 == 0 ) return false ; for ( int i = 5 ; i * i <= n ; i = i + 6 ) { if ( n % i == 0 || n % ( i + 2 ) == 0 ) { return false ; } } return true ; } static bool isPowerOfTwo ( int n ) { return n != 0 && ( ( n & ( n - 1 ) ) == 0 ) ; } public static void Main ( ) { int n = 43 ; if ( isPrime ( n ) && ( isPowerOfTwo ( n * 3 - 1 ) ) ) { Console . WriteLine ( " YES " ) ; } else { Console . WriteLine ( " NO " ) ; } } }

Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static float area ( float a ) { if ( a < 0 ) return - 1 ; float area = ( float ) Math . Pow ( ( a * Math . Sqrt ( 3 ) ) / ( Math . Sqrt ( 2 ) ) , 2 ) ; return area ; } public static void Main ( ) { float a = 5 ; Console . WriteLine ( area ( a ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int nthTerm ( int n ) { return 3 * ( int ) Math . Pow ( n , 2 ) - 4 * n + 2 ; } public static void Main ( ) { int N = 4 ; Console . Write ( nthTerm ( N ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class gfg { public void calculateSum ( int n ) { double r = ( n * ( n + 1 ) / 2 + Math . Pow ( ( n * ( n + 1 ) / 2 ) , 2 ) ) ; Console . WriteLine ( " Sum ▁ = ▁ " + r ) ; } public static int Main ( ) { gfg g = new gfg ( ) ; int n = 3 ; g . calculateSum ( n ) ; Console . Read ( ) ; return 0 ; } }

Class/struct names: gfg
C# program:
using System ; class GFG { static bool arePermutations ( int [ ] a , int [ ] b , int n , int m ) { int sum1 = 0 , sum2 = 0 , mul1 = 1 , mul2 = 1 ; for ( int i = 0 ; i < n ; i ++ ) { sum1 += a [ i ] ; mul1 *= a [ i ] ; } for ( int i = 0 ; i < m ; i ++ ) { sum2 += b [ i ] ; mul2 *= b [ i ] ; } return ( ( sum1 == sum2 ) && ( mul1 == mul2 ) ) ; } public static void Main ( ) { int [ ] a = { 1 , 3 , 2 } ; int [ ] b = { 3 , 1 , 2 } ; int n = a . Length ; int m = b . Length ; if ( arePermutations ( a , b , n , m ) == true ) Console . Write ( " Yes " ) ; else Console . Write ( " No " ) ; } }

Index/key variables: i
Accumulator variables: i, mul1, mul2, sum1, sum2
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int Race ( int B , int C ) { int result = 0 ; result = ( ( C * 100 ) / B ) ; return 100 - result ; } public static void Main ( ) { int B = 10 ; int C = 28 ; B = 100 - B ; C = 100 - C ; Console . Write ( Race ( B , C ) + " ▁ meters " ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float Time ( float [ ] arr , int n , float Emptypipe ) { float fill = 0 ; for ( int i = 0 ; i < n ; i ++ ) fill += 1 / arr [ i ] ; fill = fill - ( 1 / ( float ) Emptypipe ) ; return 1 / fill ; } public static void Main ( ) { float [ ] arr = { 12 , 14 } ; float Emptypipe = 30 ; int n = arr . Length ; Console . WriteLine ( ( int ) ( Time ( arr , n , Emptypipe ) ) + " ▁ Hours " ) ; } }

Index/key variables: i
Accumulator variables: fill, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int check ( int n ) { int sum = 0 ; while ( n != 0 ) { sum += n % 10 ; n = n / 10 ; } if ( sum % 7 == 0 ) return 1 ; else return 0 ; } public static void Main ( String [ ] args ) { int n = 25 ; String s = ( check ( n ) == 1 ) ? " YES " : " NO " ; Console . WriteLine ( s ) ; } }

Accumulator variables: sum
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isPrime ( int n ) { if ( n <= 1 ) return false ; if ( n <= 3 ) return true ; if ( n % 2 == 0 n % 3 == 0 ) return false ; for ( int i = 5 ; i * i <= n ; i = i + 6 ) if ( n % i == 0 || n % ( i + 2 ) == 0 ) return false ; return true ; } static int SumOfPrimeDivisors ( int n ) { int sum = 0 ; for ( int i = 1 ; i <= n ; i ++ ) { if ( n % i == 0 ) { if ( isPrime ( i ) ) sum += i ; } } return sum ; } public static void Main ( ) { int n = 60 ; Console . WriteLine ( " Sum ▁ of ▁ prime ▁ divisors ▁ of ▁ 60 ▁ is ▁ " + SumOfPrimeDivisors ( n ) + " STRNEWLINE " ) ; } }

Accumulator variables: i, sum
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int Sum ( int N ) { int [ ] SumOfPrimeDivisors = new int [ N + 1 ] ; for ( int i = 2 ; i <= N ; ++ i ) { if ( SumOfPrimeDivisors [ i ] == 0 ) { for ( int j = i ; j <= N ; j += i ) { SumOfPrimeDivisors [ j ] += i ; } } } return SumOfPrimeDivisors [ N ] ; } public static void Main ( ) { int N = 60 ; Console . Write ( " Sum ▁ of ▁ prime ▁ " + " divisors ▁ of ▁ 60 ▁ is ▁ " + Sum ( N ) + " STRNEWLINE " ) ; } }

Index/key variables: N, i, j
Accumulator variables: j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static long power ( long x , long y , long p ) { long res = 1 ; x = x % p ; while ( y > 0 ) { if ( ( y & 1 ) > 0 ) res = ( res * x ) % p ; x = ( x * x ) % p ; } return res ; } public static void Main ( ) { long a = 3 ; string b = "100000000000000000000000000" ; long remainderB = 0 ; long MOD = 1000000007 ; for ( int i = 0 ; i < b . Length ; i ++ ) remainderB = ( remainderB * 10 + b [ i ] - '0' ) % ( MOD - 1 ) ; Console . WriteLine ( power ( a , remainderB , MOD ) ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static string find_Square_369 ( string num ) { char a , b , c , d ; if ( num [ 0 ] == '3' ) { a = '1' ; b = '0' ; c = '8' ; d = '9' ; } else if ( num [ 0 ] == '6' ) { a = '4' ; b = '3' ; c = '5' ; d = '6' ; } else { a = '9' ; b = '8' ; c = '0' ; d = '1' ; } string result = " " ; int size = num . Length ; for ( int i = 1 ; i < size ; i ++ ) result += a ; result += b ; for ( int i = 1 ; i < size ; i ++ ) result += c ; result += d ; return result ; } public static void Main ( ) { string num_3 , num_6 , num_9 ; num_3 = "3333" ; num_6 = "6666" ; num_9 = "9999" ; string result = " " ; result = find_Square_369 ( num_3 ) ; Console . Write ( " Square ▁ of ▁ " + num_3 + " ▁ is ▁ : ▁ " + result + " STRNEWLINE " ) ; result = find_Square_369 ( num_6 ) ; Console . Write ( " Square ▁ of ▁ " + num_9 + " ▁ is ▁ : ▁ " + result + " STRNEWLINE " ) ; result = find_Square_369 ( num_9 ) ; Console . Write ( " Square ▁ of ▁ " + num_9 + " ▁ is ▁ : ▁ " + result + " STRNEWLINE " ) ; } }

Accumulator variables: i, result
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { public static void Main ( ) { long ans = 1 ; long mod = ( long ) 1000000007 * 120 ; for ( int i = 0 ; i < 5 ; i ++ ) ans = ( ans * ( 55555 - i ) ) % mod ; ans = ans / 120 ; Console . Write ( " Answer ▁ using ▁ " + " shortcut : ▁ " + ans ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int fact ( int n ) { if ( n == 0 n == 1 ) return 1 ; int ans = 1 ; for ( int i = 1 ; i <= n ; i ++ ) ans = ans * i ; return ans ; } static int nCr ( int n , int r ) { int Nr = n , Dr = 1 , ans = 1 ; for ( int i = 1 ; i <= r ; i ++ ) { ans = ( ans * Nr ) / ( Dr ) ; Nr -- ; Dr ++ ; } return ans ; } static int solve ( int n ) { int N = 2 * n - 2 ; int R = n - 1 ; return nCr ( N , R ) * fact ( n - 1 ) ; } public static void Main ( ) { int n = 6 ; Console . WriteLine ( solve ( n ) ) ; } }

Accumulator variables: Dr, Nr, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void pythagoreanTriplet ( int n ) { for ( int i = 1 ; i <= n / 3 ; i ++ ) { for ( int j = i + 1 ; j <= n / 2 ; j ++ ) { int k = n - i - j ; if ( i * i + j * j == k * k ) { Console . Write ( i + " , ▁ " + j + " , ▁ " + k ) ; return ; } } } Console . Write ( " No ▁ Triplet " ) ; } public static void Main ( ) { int n = 12 ; pythagoreanTriplet ( n ) ; } }

Accumulator variables: i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int factorial ( int n ) { int f = 1 ; for ( int i = 2 ; i <= n ; i ++ ) f *= i ; return f ; } static void series ( int A , int X , int n ) { int nFact = factorial ( n ) ; for ( int i = 0 ; i < n + 1 ; i ++ ) { int niFact = factorial ( n - i ) ; int iFact = factorial ( i ) ; int aPow = ( int ) Math . Pow ( A , n - i ) ; int xPow = ( int ) Math . Pow ( X , i ) ; Console . Write ( ( nFact * aPow * xPow ) / ( niFact * iFact ) + " ▁ " ) ; } } public static void Main ( ) { int A = 3 , X = 4 , n = 5 ; series ( A , X , n ) ; } }

Accumulator variables: f, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int seiresSum ( int n , int [ ] a ) { int res = 0 , i ; for ( i = 0 ; i < 2 * n ; i ++ ) { if ( i % 2 == 0 ) res += a [ i ] * a [ i ] ; else res -= a [ i ] * a [ i ] ; } return res ; } public static void Main ( ) { int n = 2 ; int [ ] a = { 1 , 2 , 3 , 4 } ; Console . WriteLine ( seiresSum ( n , a ) ) ; } }

Index/key variables: i
Accumulator variables: i, res
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int power ( int n , int r ) { int count = 0 ; for ( int i = r ; ( n / i ) >= 1 ; i = i * r ) count += n / i ; return count ; } public static void Main ( ) { int n = 6 , r = 3 ; Console . WriteLine ( power ( n , r ) ) ; } }

Accumulator variables: count
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int avg_of_odd_num ( int n ) { int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) sum += ( 2 * i + 1 ) ; return sum / n ; } public static void Main ( ) { int n = 20 ; avg_of_odd_num ( n ) ; Console . Write ( avg_of_odd_num ( n ) ) ; } }

Accumulator variables: i, sum
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int avg_of_odd_num ( int n ) { return n ; } public static void Main ( ) { int n = 8 ; Console . Write ( avg_of_odd_num ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void fib ( int [ ] f , int N ) { f [ 1 ] = 1 ; f [ 2 ] = 1 ; for ( int i = 3 ; i <= N ; i ++ ) f [ i ] = f [ i - 1 ] + f [ i - 2 ] ; } static void fiboTriangle ( int n ) { int N = n * ( n + 1 ) / 2 ; int [ ] f = new int [ N + 1 ] ; fib ( f , N ) ; int fiboNum = 1 ; for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 1 ; j <= i ; j ++ ) Console . Write ( f [ fiboNum ++ ] + " ▁ " ) ; Console . WriteLine ( ) ; } } public static void Main ( ) { int n = 5 ; fiboTriangle ( n ) ; } }

Index/key variables: i
Accumulator variables: fiboNum, i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int averageOdd ( int n ) { if ( n % 2 == 0 ) { Console . Write ( " Invalid ▁ Input " ) ; return - 1 ; } int sum = 0 , count = 0 ; while ( n >= 1 ) { count ++ ; sum += n ; n = n - 2 ; } return sum / count ; } public static void Main ( ) { int n = 15 ; Console . Write ( averageOdd ( n ) ) ; } }

Accumulator variables: count, sum
Class/struct names: GFG
C# program:
using System ; class GFG { static int averageOdd ( int n ) { if ( n % 2 == 0 ) { Console . Write ( " Invalid ▁ Input " ) ; return - 1 ; } return ( n + 1 ) / 2 ; } public static void Main ( ) { int n = 15 ; Console . Write ( averageOdd ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { class Rational { public int nume , deno ; public Rational ( int nume , int deno ) { this . nume = nume ; this . deno = deno ; } } ; static int lcm ( int a , int b ) { return ( a * b ) / ( __gcd ( a , b ) ) ; } static Rational maxRational ( Rational first , Rational sec ) { int k = lcm ( first . deno , sec . deno ) ; int nume1 = first . nume ; int nume2 = sec . nume ; nume1 *= k / ( first . deno ) ; nume2 *= k / ( sec . deno ) ; return ( nume2 < nume1 ) ? first : sec ; } static int __gcd ( int a , int b ) { return b == 0 ? a : __gcd ( b , a % b ) ; } public static void Main ( String [ ] args ) { Rational first = new Rational ( 3 , 2 ) ; Rational sec = new Rational ( 3 , 4 ) ; Rational res = maxRational ( first , sec ) ; Console . Write ( res . nume + " / " + res . deno ) ; } }

Accumulator variables: nume1, nume2
Class/struct names: GFG, Rational
C# program:
using System ; public class GfG { public static int TrinomialValue ( int n , int k ) { if ( n == 0 && k == 0 ) return 1 ; if ( k < - n k > n ) return 0 ; return TrinomialValue ( n - 1 , k - 1 ) + TrinomialValue ( n - 1 , k ) + TrinomialValue ( n - 1 , k + 1 ) ; } public static void printTrinomial ( int n ) { for ( int i = 0 ; i < n ; i ++ ) { for ( int j = - i ; j <= 0 ; j ++ ) Console . Write ( TrinomialValue ( i , j ) + " ▁ " ) ; for ( int j = 1 ; j <= i ; j ++ ) Console . Write ( TrinomialValue ( i , j ) + " ▁ " ) ; Console . WriteLine ( ) ; } } public static void Main ( ) { int n = 4 ; printTrinomial ( n ) ; } }

Accumulator variables: i, j
Iterator variables: i, j
Class/struct names: GfG
C# program:
using System ; class GFG { private static int MAX = 10 ; public static int TrinomialValue ( int [ , ] dp , int n , int k ) { if ( k < 0 ) k = - k ; if ( dp [ n , k ] != 0 ) return dp [ n , k ] ; if ( n == 0 && k == 0 ) return 1 ; if ( k < - n k > n ) return 0 ; return ( dp [ n , k ] = TrinomialValue ( dp , n - 1 , k - 1 ) + TrinomialValue ( dp , n - 1 , k ) + TrinomialValue ( dp , n - 1 , k + 1 ) ) ; } public static void printTrinomial ( int n ) { int [ , ] dp = new int [ MAX , MAX ] ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = - i ; j <= 0 ; j ++ ) Console . Write ( TrinomialValue ( dp , i , j ) + " ▁ " ) ; for ( int j = 1 ; j <= i ; j ++ ) Console . Write ( TrinomialValue ( dp , i , j ) + " ▁ " ) ; Console . WriteLine ( ) ; } } static public void Main ( ) { int n = 4 ; printTrinomial ( n ) ; } }

Accumulator variables: i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int sumOfLargePrimeFactor ( int n ) { int [ ] prime = new int [ n + 1 ] ; int sum = 0 ; for ( int i = 1 ; i < n + 1 ; i ++ ) prime [ i ] = 0 ; int max = n / 2 ; for ( int p = 2 ; p <= max ; p ++ ) { if ( prime [ p ] == 0 ) { for ( int i = p * 2 ; i <= n ; i += p ) prime [ i ] = p ; } } for ( int p = 2 ; p <= n ; p ++ ) { if ( prime [ p ] != 0 ) sum += prime [ p ] ; else sum += p ; } return sum ; } public static void Main ( ) { int n = 12 ; Console . WriteLine ( " Sum ▁ = ▁ " + sumOfLargePrimeFactor ( n ) ) ; } }

Index/key variables: i, p
Accumulator variables: i, p, sum
Iterator variables: i, p
Class/struct names: GFG
C# program:
using System ; class GFG { static int calculate_sum ( int a , int N ) { int m = N / a ; int sum = m * ( m + 1 ) / 2 ; int ans = a * sum ; return ans ; } public static void Main ( ) { int a = 7 , N = 49 ; Console . WriteLine ( " Sum ▁ of ▁ multiples ▁ of ▁ " + a + " ▁ up ▁ to ▁ " + N + " ▁ = ▁ " + calculate_sum ( a , N ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int isPowerOf2 ( string s ) { char [ ] str = s . ToCharArray ( ) ; int len_str = str . Length ; int num = 0 ; if ( len_str == 1 && str [ len_str - 1 ] == '1' ) return 0 ; while ( len_str != 1 str [ len_str - 1 ] != '1' ) { if ( ( str [ len_str - 1 ] - '0' ) % 2 == 1 ) return 0 ; int j = 0 ; for ( int i = 0 ; i < len_str ; i ++ ) { num = num * 10 + ( int ) str [ i ] - ( int ) '0' ; if ( num < 2 ) { if ( i != 0 ) str [ j ++ ] = '0' ; continue ; } str [ j ++ ] = ( char ) ( ( int ) ( num / 2 ) + ( int ) '0' ) ; num = ( num ) - ( num / 2 ) * 2 ; } str [ j ] = ' \0' ; len_str = j ; } return 1 ; } static void Main ( ) { string str1 = "124684622466842024680246842024662202000002" ; string str2 = "1" ; string str3 = "128" ; Console . Write ( isPowerOf2 ( str1 ) + " STRNEWLINE " + isPowerOf2 ( str2 ) + " STRNEWLINE " + isPowerOf2 ( str3 ) ) ; } }

Index/key variables: i, j
Accumulator variables: i, j
Iterator variables: i
Class/struct names: GFG
C# program:
class GFG { static long ispowerof2 ( long num ) { if ( ( num & ( num - 1 ) ) == 0 ) return 1 ; return 0 ; } public static void Main ( ) { long num = 549755813888 ; System . Console . WriteLine ( ispowerof2 ( num ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int counDivisors ( int X ) { int count = 0 ; for ( int i = 1 ; i <= X ; ++ i ) { if ( X % i == 0 ) { count ++ ; } } return count ; } static int countDivisorsMult ( int [ ] arr , int n ) { int mul = 1 ; for ( int i = 0 ; i < n ; ++ i ) mul *= arr [ i ] ; return counDivisors ( mul ) ; } public static void Main ( ) { int [ ] arr = { 2 , 4 , 6 } ; int n = arr . Length ; Console . Write ( countDivisorsMult ( arr , n ) ) ; } }

Index/key variables: i
Accumulator variables: count, mul
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static void SieveOfEratosthenes ( int largest , List < int > prime ) { bool [ ] isPrime = new bool [ largest + 1 ] ; Array . Fill ( isPrime , true ) ; for ( int p = 2 ; p * p <= largest ; p ++ ) { if ( isPrime [ p ] == true ) { for ( int i = p * 2 ; i <= largest ; i += p ) isPrime [ i ] = false ; } } for ( int p = 2 ; p <= largest ; p ++ ) if ( isPrime [ p ] ) prime . Add ( p ) ; } static long countDivisorsMult ( int [ ] arr , int n ) { int largest = 0 ; foreach ( int a in arr ) { largest = Math . Max ( largest , a ) ; } List < int > prime = new List < int > ( ) ; SieveOfEratosthenes ( largest , prime ) ; Dictionary < int , int > mp = new Dictionary < int , int > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < prime . Count ; j ++ ) { while ( arr [ i ] > 1 && arr [ i ] % prime [ j ] == 0 ) { arr [ i ] /= prime [ j ] ; if ( mp . ContainsKey ( prime [ j ] ) ) { mp [ prime [ j ] ] ++ ; } else { mp . Add ( prime [ j ] , 1 ) ; } } } if ( arr [ i ] != 1 ) { if ( mp . ContainsKey ( arr [ i ] ) ) { mp [ arr [ i ] ] ++ ; } else { mp . Add ( arr [ i ] , 1 ) ; } } } long res = 1 ; foreach ( KeyValuePair < int , int > it in mp ) res *= ( it . Value + 1L ) ; return res ; } static public void Main ( ) { int [ ] arr = { 2 , 4 , 6 } ; int n = arr . Length ; Console . WriteLine ( countDivisorsMult ( arr , n ) ) ; } }

Index/key variables: i, j, p
Accumulator variables: i, j, p, res
Iterator variables: a, i, it, j, p
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class solution { static void findPrimeNos ( int L , int R , Dictionary < int , int > M , int K ) { for ( int i = L ; i <= R ; i ++ ) { if ( M . ContainsKey ( i ) ) M . Add ( i , M [ i ] + 1 ) ; else M . Add ( i , 1 ) ; } if ( M [ 1 ] != 0 ) { M . Remove ( 1 ) ; } for ( int i = 2 ; i <= Math . Sqrt ( R ) ; i ++ ) { int multiple = 2 ; while ( ( i * multiple ) <= R ) { if ( M . ContainsKey ( i * multiple ) ) { M . Remove ( i * multiple ) ; } multiple ++ ; } } foreach ( KeyValuePair < int , int > entry in M ) { if ( M . ContainsKey ( entry . Key + K ) ) { Console . Write ( " ( " + entry . Key + " , ▁ " + ( entry . Key + K ) + " ) ▁ " ) ; } } } static void getPrimePairs ( int L , int R , int K ) { Dictionary < int , int > M = new Dictionary < int , int > ( ) ; findPrimeNos ( L , R , M , K ) ; } public static void Main ( String [ ] args ) { int L = 1 , R = 19 ; int K = 6 ; getPrimePairs ( L , R , K ) ; } }

Index/key variables: i
Accumulator variables: i, multiple
Iterator variables: entry, i
Class/struct names: solution
C# program:
using System ; class GFG { static int enneacontahexagonNum ( int n ) { return ( 94 * n * n - 92 * n ) / 2 ; } public static void Main ( ) { int n = 3 ; Console . Write ( enneacontahexagonNum ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void find_composite_nos ( int n ) { Console . WriteLine ( 9 * n + " ▁ " + 8 * n ) ; } public static void Main ( ) { int n = 4 ; find_composite_nos ( n ) ; } }

Class/struct names: GFG
C# program:
using System ; using System . Linq ; class GFG { static int freqPairs ( int [ ] arr , int n ) { int max = arr . Max ( ) ; int [ ] freq = new int [ max + 1 ] ; int count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { freq [ arr [ i ] ] ++ ; } for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 2 * arr [ i ] ; j <= max ; j += arr [ i ] ) { if ( freq [ j ] >= 1 ) { count += freq [ j ] ; } } if ( freq [ arr [ i ] ] > 1 ) { count += freq [ arr [ i ] ] - 1 ; freq [ arr [ i ] ] -- ; } } return count ; } public static void Main ( String [ ] args ) { int [ ] arr = { 3 , 2 , 4 , 2 , 6 } ; int n = arr . Length ; Console . WriteLine ( freqPairs ( 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 double Nth_Term ( int n ) { return ( 2 * Math . Pow ( n , 3 ) - 3 * Math . Pow ( n , 2 ) + n + 6 ) / 6 ; } static public void Main ( ) { int N = 8 ; Console . WriteLine ( Nth_Term ( N ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int printNthElement ( int n ) { int [ ] arr = new int [ n + 1 ] ; arr [ 1 ] = 3 ; arr [ 2 ] = 5 ; for ( int i = 3 ; i <= n ; i ++ ) { if ( i % 2 != 0 ) arr [ i ] = arr [ i / 2 ] * 10 + 3 ; else arr [ i ] = arr [ ( i / 2 ) - 1 ] * 10 + 5 ; } return arr [ n ] ; } static void Main ( ) { int n = 6 ; Console . WriteLine ( printNthElement ( n ) ) ; } }

Index/key variables: i, n
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { public int nthTerm ( int N ) { return ( N * ( ( N / 2 ) + ( ( N % 2 ) * 2 ) + N ) ) ; } public static void Main ( ) { int N = 5 ; GFG a = new GFG ( ) ; Console . WriteLine ( " Nth ▁ term ▁ for ▁ N ▁ = ▁ " + N + " ▁ : ▁ " + a . nthTerm ( N ) ) ; } }

Class/struct names: GFG
C# program:
using System ; public class GFG { static void series ( int A , int X , int n ) { int term = ( int ) Math . Pow ( A , n ) ; Console . Write ( term + " ▁ " ) ; for ( int i = 1 ; i <= n ; i ++ ) { term = term * X * ( n - i + 1 ) / ( i * A ) ; Console . Write ( term + " ▁ " ) ; } } public static void Main ( ) { int A = 3 , X = 4 , n = 5 ; series ( A , X , n ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static bool Div_by_8 ( int n ) { return ( ( ( n >> 3 ) << 3 ) == n ) ; } public static void Main ( ) { int n = 16 ; if ( Div_by_8 ( n ) ) Console . WriteLine ( " YES " ) ; else Console . WriteLine ( " NO " ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int averageEven ( int n ) { if ( n % 2 != 0 ) { Console . Write ( " Invalid ▁ Input " ) ; return - 1 ; } int sum = 0 , count = 0 ; while ( n >= 2 ) { count ++ ; sum += n ; n = n - 2 ; } return sum / count ; } public static void Main ( ) { int n = 16 ; Console . Write ( averageEven ( n ) ) ; } }

Accumulator variables: count, sum
Class/struct names: GFG
C# program:
using System ; class GFG { static int averageEven ( int n ) { if ( n % 2 != 0 ) { Console . Write ( " Invalid ▁ Input " ) ; return - 1 ; } return ( n + 2 ) / 2 ; } public static void Main ( ) { int n = 16 ; Console . Write ( averageEven ( n ) ) ; } }

Class/struct names: GFG