dhyuti-n/xlcost-variable-roles huggingface dataset:
C# program:
using System ; using System . Collections . Generic ; class GFG { static readonly int size_int = 32 ; static int functionMax ( int [ ] arr , int n ) { List < int > [ ] setBit = new List < int > [ 32 + 1 ] ; for ( int i = 0 ; i < setBit . Length ; i ++ ) setBit [ i ] = new List < int > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < size_int ; j ++ ) { if ( ( arr [ i ] & ( 1 << j ) ) > 0 ) setBit [ j ] . Add ( i ) ; } } for ( int i = size_int ; i >= 0 ; i -- ) { if ( setBit [ i ] . Count == 1 ) { swap ( arr , 0 , setBit [ i ] [ 0 ] ) ; break ; } } int maxAnd = arr [ 0 ] ; for ( int i = 1 ; i < n ; i ++ ) { maxAnd = maxAnd & ( ~ arr [ i ] ) ; } return maxAnd ; } static int [ ] swap ( int [ ] arr , int i , int j ) { int temp = arr [ i ] ; arr [ i ] = arr [ j ] ; arr [ j ] = temp ; return arr ; } public static void Main ( String [ ] args ) { int [ ] arr = { 1 , 2 , 4 , 8 , 16 } ; int n = arr . Length ; Console . Write ( functionMax ( arr , n ) ) ; } }

Index/key variables: i, j
Accumulator variables: i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int nCr ( int n , int r ) { int res = 1 ; if ( r > n - r ) r = n - r ; for ( int i = 0 ; i < r ; ++ i ) { res *= ( n - i ) ; res /= ( i + 1 ) ; } return res ; } static int solve ( int n , int m , int k ) { int sum = 0 ; for ( int i = 0 ; i <= k ; i ++ ) sum += nCr ( n , i ) * nCr ( m , k - i ) ; return sum ; } public static void Main ( String [ ] args ) { int n = 3 , m = 2 , k = 2 ; Console . Write ( solve ( n , m , k ) ) ; } }

Accumulator variables: i, res, sum
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int powerOptimised ( int a , int n ) { int ans = 1 ; while ( n > 0 ) { int last_bit = ( n & 1 ) ; if ( last_bit > 0 ) { ans = ans * a ; } a = a * a ; n = n >> 1 ; } return ans ; } public static void Main ( String [ ] args ) { int a = 3 , n = 5 ; Console . Write ( powerOptimised ( a , n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int findMaximumGcd ( int n ) { int max_gcd = 1 ; for ( int i = 1 ; i * i <= n ; i ++ ) { if ( n % i == 0 ) { if ( i > max_gcd ) max_gcd = i ; if ( ( n / i != i ) && ( n / i != n ) && ( ( n / i ) > max_gcd ) ) max_gcd = n / i ; } } return max_gcd ; } public static void Main ( String [ ] args ) { int N = 10 ; Console . Write ( findMaximumGcd ( N ) ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static readonly int x = 2000021 ; static int [ ] v = new int [ x ] ; static void sieve ( ) { v [ 1 ] = 1 ; for ( int i = 2 ; i < x ; i ++ ) v [ i ] = i ; for ( int i = 4 ; i < x ; i += 2 ) v [ i ] = 2 ; for ( int i = 3 ; i * i < x ; i ++ ) { if ( v [ i ] == i ) { for ( int j = i * i ; j < x ; j += i ) { if ( v [ j ] == j ) { v [ j ] = i ; } } } } } static int prime_factors ( int n ) { HashSet < int > s = new HashSet < int > ( ) ; while ( n != 1 ) { s . Add ( v [ n ] ) ; n = n / v [ n ] ; } return s . Count ; } static void distinctPrimes ( int m , int k ) { List < int > result = new List < int > ( ) ; for ( int i = 14 ; i < m + k ; i ++ ) { long count = prime_factors ( i ) ; if ( count == k ) { result . Add ( i ) ; } } int p = result . Count ; for ( int index = 0 ; index < p - 1 ; index ++ ) { long element = result [ index ] ; int count = 1 , z = index ; while ( z < p - 1 && count <= k && result [ z ] + 1 == result [ z + 1 ] ) { count ++ ; z ++ ; } if ( count >= k ) Console . Write ( element + " ▁ " ) ; } } public static void Main ( String [ ] args ) { sieve ( ) ; int N = 1000 , K = 3 ; distinctPrimes ( N , K ) ; } }

Index/key variables: i, index, j, n, x, z
Accumulator variables: count, i, index, j, z
Iterator variables: i, index, j
Class/struct names: GFG
C# program:
using System ; class GFG { static void print_product ( int a , int b , int c , int d ) { int prod1 = a * c ; int prod2 = b * d ; int prod3 = ( a + b ) * ( c + d ) ; int real = prod1 - prod2 ; int imag = prod3 - ( prod1 + prod2 ) ; Console . Write ( real + " ▁ + ▁ " + imag + " i " ) ; } public static void Main ( ) { int a , b , c , d ; a = 2 ; b = 3 ; c = 4 ; d = 5 ; print_product ( a , b , c , d ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static bool isInsolite ( int n ) { int N = n ; int sum = 0 ; int product = 1 ; while ( n != 0 ) { int r = n % 10 ; sum = sum + r * r ; product = product * r * r ; n = n / 10 ; } return ( N % sum == 0 ) && ( N % product == 0 ) ; } public static void Main ( ) { int N = 111 ; if ( isInsolite ( N ) ) Console . Write ( " Yes " ) ; else Console . Write ( " No " ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int sigma ( int n ) { if ( n == 1 ) return 1 ; int result = 0 ; for ( int i = 2 ; i <= Math . Sqrt ( n ) ; i ++ ) { if ( n % i == 0 ) { if ( i == ( n / i ) ) result += i ; else result += ( i + n / i ) ; } } return ( result + n + 1 ) ; } static bool isSuperabundant ( int N ) { for ( double i = 1 ; i < N ; i ++ ) { double x = sigma ( ( int ) ( i ) ) / i ; double y = sigma ( ( int ) ( N ) ) / ( N * 1.0 ) ; if ( x > y ) return false ; } return true ; } public static void Main ( String [ ] args ) { int N = 4 ; if ( isSuperabundant ( N ) ) Console . Write ( " Yes STRNEWLINE " ) ; else Console . Write ( " No STRNEWLINE " ) ; } }

Accumulator variables: i, result
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isDNum ( int n ) { if ( n < 4 ) return false ; int numerator = 0 , hcf = 0 ; for ( int k = 2 ; k <= n ; k ++ ) { numerator = ( int ) ( Math . Pow ( k , n - 2 ) - k ) ; hcf = __gcd ( n , k ) ; } if ( hcf == 1 && ( numerator % n ) != 0 ) return false ; return true ; } static int __gcd ( int a , int b ) { return b == 0 ? a : __gcd ( b , a % b ) ; } public static void Main ( String [ ] args ) { int n = 15 ; bool a = isDNum ( n ) ; if ( a ) Console . Write ( " Yes " ) ; else Console . Write ( " No " ) ; } }

Accumulator variables: k
Iterator variables: k
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 ] == 1 ) { for ( int j = i ; j <= N ; j += i ) { SumOfPrimeDivisors [ j ] += i ; } } } return SumOfPrimeDivisors [ N ] ; } static bool RuthAaronNumber ( int n ) { if ( Sum ( n ) == Sum ( n + 1 ) ) return true ; else return false ; } public static void Main ( ) { int N = 714 ; if ( RuthAaronNumber ( N ) ) { Console . Write ( " Yes " ) ; } else { Console . Write ( " No " ) ; } } }

Index/key variables: N, i, j
Accumulator variables: j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int maxAdjacentDifference ( int N , int K ) { if ( N == 1 ) { return 0 ; } if ( N == 2 ) { return K ; } return 2 * K ; } public static void Main ( String [ ] args ) { int N = 6 ; int K = 11 ; Console . Write ( maxAdjacentDifference ( N , K ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static readonly int mod = 1000000007 ; public static int linearSum ( int n ) { return ( n * ( n + 1 ) / 2 ) % mod ; } public static int rangeSum ( int b , int a ) { return ( linearSum ( b ) - linearSum ( a ) ) % mod ; } public static int totalSum ( int n ) { int result = 0 ; int i = 1 ; while ( true ) { result += rangeSum ( n / i , n / ( i + 1 ) ) * ( i % mod ) % mod ; result %= mod ; if ( i == n ) break ; i = n / ( n / ( i + 1 ) ) ; } return result ; } public static void Main ( String [ ] args ) { int N = 4 ; Console . WriteLine ( totalSum ( N ) ) ; N = 12 ; Console . WriteLine ( totalSum ( N ) ) ; } }

Accumulator variables: result
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isDouble ( int num ) { String s = num . ToString ( ) ; int l = s . Length ; if ( s [ 0 ] == s [ 1 ] ) return false ; if ( l % 2 == 1 ) { s = s + s [ 1 ] ; l ++ ; } String s1 = s . Substring ( 0 , l / 2 ) ; String s2 = s . Substring ( l / 2 ) ; return s1 . Equals ( s2 ) ; } static bool isNontrivialUndulant ( int N ) { return N > 100 && isDouble ( N ) ; } public static void Main ( String [ ] args ) { int n = 121 ; if ( isNontrivialUndulant ( n ) ) { Console . WriteLine ( " Yes " ) ; } else { Console . WriteLine ( " No " ) ; } } }

Accumulator variables: l
Class/struct names: GFG
C# program:
using System ; class GFG { static int MegagonNum ( int n ) { return ( 999998 * n * n - 999996 * n ) / 2 ; } public static void Main ( String [ ] args ) { int n = 3 ; Console . Write ( MegagonNum ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static readonly int mod = 1000000007 ; static int productPairs ( int [ ] arr , int n ) { int product = 1 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { product *= ( arr [ i ] % mod * arr [ j ] % mod ) % mod ; product = product % mod ; } } return product % mod ; } public static void Main ( String [ ] args ) { int [ ] arr = { 1 , 2 , 3 } ; int n = arr . Length ; Console . Write ( productPairs ( arr , n ) ) ; } }

Index/key variables: i, j
Accumulator variables: i, j, product
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { const int mod = 1000000007 ; static int power ( int x , int y ) { int p = 1000000007 ; int res = 1 ; x = x % p ; while ( y > 0 ) { if ( y % 2 == 1 ) res = ( res * x ) % p ; y = y >> 1 ; x = ( x * x ) % p ; } return res ; } static int productPairs ( int [ ] arr , int n ) { int product = 1 ; for ( int i = 0 ; i < n ; i ++ ) { product = ( product % mod * ( int ) power ( arr [ i ] , ( 2 * n ) ) % mod ) % mod ; } return product % mod ; } public static void Main ( ) { int [ ] arr = { 1 , 2 , 3 } ; int n = arr . Length ; Console . Write ( productPairs ( arr , n ) ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void constructArray ( int N ) { int [ ] arr = new int [ N ] ; for ( int i = 1 ; i <= N ; i ++ ) { arr [ i - 1 ] = i ; } for ( int i = 0 ; i < N ; i ++ ) { Console . Write ( arr [ i ] + " , ▁ " ) ; } } public static void Main ( ) { int N = 6 ; constructArray ( N ) ; } }

Index/key variables: N, i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isPrime ( int n ) { if ( n <= 1 ) return false ; for ( int i = 2 ; i < n ; i ++ ) if ( n % i == 0 ) return false ; return true ; } static int countSubsequences ( int [ ] arr , int n ) { int totalSubsequence = ( int ) ( Math . Pow ( 2 , n ) - 1 ) ; int countPrime = 0 , countOnes = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( arr [ i ] == 1 ) countOnes ++ ; else if ( isPrime ( arr [ i ] ) ) countPrime ++ ; } int compositeSubsequence ; int onesSequence = ( int ) ( Math . Pow ( 2 , countOnes ) - 1 ) ; compositeSubsequence = totalSubsequence - countPrime - onesSequence - onesSequence * countPrime ; return compositeSubsequence ; } public static void Main ( ) { int [ ] arr = { 2 , 1 , 2 } ; int n = arr . Length ; Console . Write ( countSubsequences ( arr , n ) ) ; } }

Index/key variables: i
Accumulator variables: countOnes, countPrime, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void checksum ( int n , int k ) { float first_term = ( float ) ( ( ( 2 * n ) / k + ( 1 - k ) ) / 2.0 ) ; if ( first_term - ( int ) ( first_term ) == 0 ) { for ( int i = ( int ) first_term ; i <= first_term + k - 1 ; i ++ ) { Console . Write ( i + " ▁ " ) ; } } else Console . Write ( " - 1" ) ; } public static void Main ( String [ ] args ) { int n = 33 , k = 6 ; checksum ( n , k ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void sumEvenNumbers ( int N , int K ) { int check = N - 2 * ( K - 1 ) ; if ( check > 0 && check % 2 == 0 ) { for ( int i = 0 ; i < K - 1 ; i ++ ) { Console . Write ( "2 ▁ " ) ; } Console . WriteLine ( check ) ; } else { Console . WriteLine ( " - 1" ) ; } } static public void Main ( String [ ] args ) { int N = 8 ; int K = 2 ; sumEvenNumbers ( N , K ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { public static int [ ] calculateWays ( int N ) { int x = 0 ; int [ ] v = new int [ N ] ; for ( int i = 0 ; i < N ; i ++ ) v [ i ] = 0 ; for ( int i = 0 ; i < N / 2 ; i ++ ) { if ( N % 2 == 0 && i == N / 2 ) break ; x = N * ( i + 1 ) - ( i + 1 ) * i ; v [ i ] = x ; v [ N - i - 1 ] = x ; } return v ; } public static void printArray ( int [ ] v ) { for ( int i = 0 ; i < v . Length ; i ++ ) { Console . Write ( v [ i ] + " ▁ " ) ; } } public static void Main ( string [ ] args ) { int [ ] v ; v = calculateWays ( 4 ) ; printArray ( v ) ; } }

Index/key variables: N, i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static readonly int MAXN = 10000000 ; static int sumOfDigits ( int n ) { int sum = 0 ; while ( n > 0 ) { sum += n % 10 ; n /= 10 ; } return sum ; } static int smallestNum ( int X , int Y ) { int res = - 1 ; for ( int i = X ; i < MAXN ; i ++ ) { int sum_of_digit = sumOfDigits ( i ) ; if ( sum_of_digit % Y == 0 ) { res = i ; break ; } } return res ; } public static void Main ( String [ ] args ) { int X = 5923 , Y = 13 ; Console . Write ( smallestNum ( X , Y ) ) ; } }

Accumulator variables: i, n, sum
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static int countValues ( int N ) { List < int > div = new List < int > ( ) ; for ( int i = 2 ; i * i <= N ; i ++ ) { if ( N % i == 0 ) { div . Add ( i ) ; if ( N != i * i ) { div . Add ( N / i ) ; } } } int answer = 0 ; for ( int i = 1 ; i * i <= N - 1 ; i ++ ) { if ( ( N - 1 ) % i == 0 ) { if ( i * i == N - 1 ) answer ++ ; else answer += 2 ; } } foreach ( int d in div ) { int K = N ; while ( K % d == 0 ) K /= d ; if ( ( K - 1 ) % d == 0 ) answer ++ ; } return answer ; } public static void Main ( String [ ] args ) { int N = 6 ; Console . Write ( countValues ( N ) ) ; } }

Accumulator variables: K, answer, i
Iterator variables: d, i
Class/struct names: GFG
C# program:
using System ; class GFG { static void findMaxPrimeDivisor ( int n ) { int max_possible_prime = 0 ; while ( n % 2 == 0 ) { max_possible_prime ++ ; n = n / 2 ; } for ( int i = 3 ; i * i <= n ; i = i + 2 ) { while ( n % i == 0 ) { max_possible_prime ++ ; n = n / i ; } } if ( n > 2 ) { max_possible_prime ++ ; } Console . Write ( max_possible_prime + " STRNEWLINE " ) ; } public static void Main ( String [ ] args ) { int n = 4 ; findMaxPrimeDivisor ( n ) ; } }

Accumulator variables: max_possible_prime
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int CountWays ( int n ) { int ans = ( n - 1 ) / 2 ; return ans ; } public static void Main ( ) { int N = 8 ; Console . Write ( CountWays ( N ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void Solve ( int [ ] arr , int size , int n ) { int [ ] v = new int [ n + 1 ] ; for ( int i = 0 ; i < size ; i ++ ) v [ arr [ i ] ] ++ ; int max1 = - 1 , mx = - 1 ; for ( int i = 0 ; i < v . Length ; i ++ ) { if ( v [ i ] > mx ) { mx = v [ i ] ; max1 = i ; } } int cnt = 0 ; foreach ( int i in v ) { if ( i == 0 ) ++ cnt ; } int diff1 = n + 1 - cnt ; int max_size = Math . Max ( Math . Min ( v [ max1 ] - 1 , diff1 ) , Math . Min ( v [ max1 ] , diff1 - 1 ) ) ; Console . Write ( " Maximum ▁ size ▁ is ▁ : " + max_size + " STRNEWLINE " ) ; Console . Write ( " The ▁ First ▁ Array ▁ Is ▁ : STRNEWLINE " ) ; for ( int i = 0 ; i < max_size ; i ++ ) { Console . Write ( max1 + " ▁ " ) ; v [ max1 ] -= 1 ; } Console . Write ( " STRNEWLINE " ) ; Console . Write ( " The ▁ Second ▁ Array ▁ Is ▁ : STRNEWLINE " ) ; for ( int i = 0 ; i < ( n + 1 ) ; i ++ ) { if ( v [ i ] > 0 ) { Console . Write ( i + " ▁ " ) ; max_size -- ; } if ( max_size < 1 ) break ; } Console . Write ( " STRNEWLINE " ) ; } public static void Main ( string [ ] args ) { int n = 7 ; int [ ] arr = new int [ ] { 1 , 2 , 1 , 5 , 1 , 6 , 7 , 2 } ; int size = arr . Length ; Solve ( arr , size , n ) ; } }

Index/key variables: i, max1
Accumulator variables: i, max_size
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int power ( int x , int y , int p ) { int res = 1 ; x = x % p ; while ( y > 0 ) { if ( ( y & 1 ) == 1 ) res = ( res * x ) % p ; x = ( x * x ) % p ; } return res ; } static int modInverse ( int n , int p ) { return power ( n , p - 2 , p ) ; } static int nCrModPFermat ( int n , int r , int p ) { if ( r == 0 ) return 1 ; if ( n < r ) return 0 ; int [ ] fac = new int [ n + 1 ] ; fac [ 0 ] = 1 ; for ( int i = 1 ; i <= n ; i ++ ) fac [ i ] = fac [ i - 1 ] * i % p ; return ( fac [ n ] * modInverse ( fac [ r ] , p ) % p * modInverse ( fac [ n - r ] , p ) % p ) % p ; } static int SumOfXor ( int [ ] a , int n ) { int mod = 10037 ; int answer = 0 ; for ( int k = 0 ; k < 32 ; k ++ ) { int x = 0 , y = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ( a [ i ] & ( 1 << k ) ) != 0 ) x ++ ; else y ++ ; } answer += ( ( 1 << k ) % mod * ( nCrModPFermat ( x , 3 , mod ) + x * nCrModPFermat ( y , 2 , mod ) ) % mod ) % mod ; } return answer ; } public static void Main ( String [ ] args ) { int n = 5 ; int [ ] A = { 3 , 5 , 2 , 18 , 7 } ; Console . WriteLine ( SumOfXor ( A , n ) ) ; } }

Index/key variables: i, n, r
Accumulator variables: answer, i, k, x, y
Iterator variables: i, k
Class/struct names: GFG
C# program:
using System ; class GFG { public static float round ( float var , int digit ) { float value = ( int ) ( var * Math . ( 10 , digit ) + .5 ) ; return ( float ) value / ( float ) Math . Pow ( 10 , digit ) ; } public static int probability ( int N ) { int a = 2 ; int b = 3 ; if ( N == 1 ) { return a ; } else if ( N == 2 ) { return b ; } else { for ( int i = 3 ; i <= N ; i ++ ) { int c = a + b ; a = b ; b = c ; } return b ; } } public static float operations ( int N ) { int x = probability ( N ) ; int y = ( int ) Math . Pow ( 2 , N ) ; return round ( ( float ) x / ( float ) y , 2 ) ; } public static void Main ( string [ ] args ) { int N = 10 ; Console . WriteLine ( ( operations ( N ) ) ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isPerfectCube ( int x ) { double cr = Math . Round ( Math . Cbrt ( x ) ) ; return ( cr * cr * cr == x ) ; } static void checkCube ( int a , int b ) { string s1 = Convert . ToString ( a ) ; string s2 = Convert . ToString ( b ) ; int c = Convert . ToInt32 ( s1 + s2 ) ; if ( isPerfectCube ( c ) ) { Console . WriteLine ( " Yes " ) ; } else { Console . WriteLine ( " No " ) ; } } public static void Main ( ) { int a = 6 ; int b = 4 ; checkCube ( a , b ) ; } }

Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static int largest_sum ( int [ ] arr , int n ) { int maximum = - 1 ; Dictionary < int , int > m = new Dictionary < int , int > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( m . ContainsKey ( arr [ i ] ) ) { m [ arr [ i ] ] ++ ; } else { m . Add ( arr [ i ] , 1 ) ; } } for ( int i = 0 ; i < n ; i ++ ) { if ( m [ arr [ i ] ] > 1 ) { if ( m . ContainsKey ( 2 * arr [ i ] ) ) { m [ 2 * arr [ i ] ] = m [ 2 * arr [ i ] ] + m [ arr [ i ] ] / 2 ; } else { m . Add ( 2 * arr [ i ] , m [ arr [ i ] ] / 2 ) ; } if ( 2 * arr [ i ] > maximum ) maximum = 2 * arr [ i ] ; } } return maximum ; } public static void Main ( ) { int [ ] arr = { 1 , 1 , 2 , 4 , 7 , 8 } ; int n = arr . Length ; Console . Write ( largest_sum ( arr , n ) ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void canBeReduced ( int x , int y ) { int maxi = Math . Max ( x , y ) ; int mini = Math . Min ( x , y ) ; if ( ( ( x + y ) % 3 ) == 0 && maxi <= 2 * mini ) Console . WriteLine ( " YES " ) ; else Console . WriteLine ( " NO " ) ; } static void Main ( ) { int x = 6 , y = 9 ; canBeReduced ( x , y ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void isPrime ( int N ) { bool isPrime = true ; int [ ] arr = { 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 } ; if ( N < 2 ) { isPrime = false ; } if ( N % 2 == 0 N % 3 == 0 N % 5 == 0 ) { isPrime = false ; } for ( int i = 0 ; i < ( int ) Math . Sqrt ( N ) ; i += 30 ) { foreach ( int c in arr ) { if ( c > ( int ) Math . Sqrt ( N ) ) { break ; } else { if ( N % ( c + i ) == 0 ) { isPrime = false ; break ; } } if ( ! isPrime ) break ; } } if ( isPrime ) Console . WriteLine ( " Prime ▁ Number " ) ; else Console . WriteLine ( " Not ▁ a ▁ Prime ▁ Number " ) ; } public static void Main ( String [ ] args ) { int N = 121 ; isPrime ( N ) ; } }

Accumulator variables: i
Iterator variables: c, i
Boolean variables: isPrime
Class/struct names: GFG
C# program:
using System ; class GFG { static void printPairs ( int [ ] arr , int n ) { for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { Console . Write ( " ( " + arr [ i ] + " , ▁ " + arr [ j ] + " ) " + " , ▁ " ) ; } } } public static void Main ( string [ ] args ) { int [ ] arr = { 1 , 2 } ; int n = arr . Length ; printPairs ( arr , n ) ; } }

Index/key variables: i, j
Accumulator variables: i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static void circle ( int x1 , int y1 , int x2 , int y2 , int r1 , int r2 ) { int distSq = ( int ) Math . Sqrt ( ( ( x1 - x2 ) * ( x1 - x2 ) ) + ( ( y1 - y2 ) * ( y1 - y2 ) ) ) ; if ( distSq + r2 == r1 ) { Console . WriteLine ( " The ▁ smaller ▁ circle ▁ lies ▁ completely " + " ▁ inside ▁ the ▁ bigger ▁ circle ▁ with ▁ " + " touching ▁ each ▁ other ▁ " + " at ▁ a ▁ point ▁ of ▁ circumference . ▁ " ) ; } else if ( distSq + r2 < r1 ) { Console . WriteLine ( " The ▁ smaller ▁ circle ▁ lies ▁ completely " + " ▁ inside ▁ the ▁ bigger ▁ circle ▁ without " + " ▁ touching ▁ each ▁ other ▁ " + " at ▁ a ▁ point ▁ of ▁ circumference . " ) ; } else { Console . WriteLine ( " The ▁ smaller ▁ does ▁ not ▁ lies ▁ inside " + " ▁ the ▁ bigger ▁ circle ▁ completely . " ) ; } } static public void Main ( ) { int x1 = 10 , y1 = 8 ; int x2 = 1 , y2 = 2 ; int r1 = 30 , r2 = 10 ; circle ( x1 , y1 , x2 , y2 , r1 , r2 ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void lengtang ( double r1 , double r2 , double d ) { Console . WriteLine ( " The ▁ length ▁ of ▁ the ▁ direct " + " ▁ common ▁ tangent ▁ is ▁ " + ( Math . Sqrt ( Math . Pow ( d , 2 ) - Math . Pow ( ( r1 - r2 ) , 2 ) ) ) ) ; } public static void Main ( String [ ] args ) { double r1 = 4 , r2 = 6 , d = 3 ; lengtang ( r1 , r2 , d ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void rad ( double d , double h ) { Console . WriteLine ( " The ▁ radius ▁ of ▁ the ▁ circle ▁ is ▁ " + ( ( d * d ) / ( 8 * h ) + h / 2 ) ) ; } public static void Main ( ) { double d = 4 , h = 1 ; rad ( d , h ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void shortdis ( double r , double d ) { Console . WriteLine ( " The ▁ shortest ▁ distance ▁ " + " from ▁ the ▁ chord ▁ to ▁ centre ▁ " + ( Math . Sqrt ( ( r * r ) - ( ( d * d ) / 4 ) ) ) ) ; } public static void Main ( ) { double r = 4 , d = 3 ; shortdis ( r , d ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void lengtang ( double r1 , double r2 , double d ) { Console . WriteLine ( " The ▁ length ▁ of ▁ the ▁ direct " + " ▁ common ▁ tangent ▁ is ▁ " + ( Math . Sqrt ( Math . Pow ( d , 2 ) - Math . Pow ( ( r1 - r2 ) , 2 ) ) ) ) ; } public static void Main ( ) { double r1 = 4 , r2 = 6 , d = 12 ; lengtang ( r1 , r2 , d ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double square ( double a ) { if ( a < 0 ) return - 1 ; double x = 0.464 * a ; return x ; } public static void Main ( ) { double a = 5 ; Console . WriteLine ( square ( a ) ) ; } }

Class/struct names: GFG