dhyuti-n/xlcost-variable-roles huggingface dataset:
C# program:
using System ; class GFG { public static long M = 1000000007 ; static long power ( long x , long y ) { long res = 1 ; while ( y > 0 ) { if ( y % 2 == 1 ) res = ( res * x ) % M ; y = ( y >> 1 ) % M ; x = ( x * x ) % M ; } return res ; } static int countFactors ( int n ) { int count = 0 ; for ( int i = 1 ; i * i <= n ; i ++ ) { if ( n % i == 0 ) { if ( n / i == i ) count ++ ; else count += 2 ; } } return count ; } static long multiplyFactors ( int n ) { int numFactor = countFactors ( n ) ; long product = power ( n , numFactor / 2 ) ; if ( numFactor % 2 == 1 ) product = ( product * ( int ) Math . Sqrt ( n ) ) % M ; return product ; } public static void Main ( ) { int n = 12 ; Console . Write ( multiplyFactors ( n ) ) ; } }

Accumulator variables: count, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isDivisibleBy10 ( String bin ) { int n = bin . Length ; if ( bin [ n - 1 ] == '1' ) return false ; int sum = 0 ; for ( int i = n - 2 ; i >= 0 ; i -- ) { if ( bin [ i ] == '1' ) { int posFromRight = n - i - 1 ; if ( posFromRight % 4 == 1 ) sum = sum + 2 ; else if ( posFromRight % 4 == 2 ) sum = sum + 4 ; else if ( posFromRight % 4 == 3 ) sum = sum + 8 ; else if ( posFromRight % 4 == 0 ) sum = sum + 6 ; } } if ( sum % 10 == 0 ) return true ; return false ; } public static void Main ( ) { String bin = "11000111001110" ; if ( isDivisibleBy10 ( bin ) ) Console . Write ( " Yes " ) ; else Console . Write ( " No " ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void printTrib ( int n ) { if ( n < 1 ) return ; int first = 0 , second = 0 ; int third = 1 ; Console . Write ( first + " ▁ " ) ; if ( n > 1 ) Console . Write ( second + " ▁ " ) ; if ( n > 2 ) Console . Write ( second + " ▁ " ) ; for ( int i = 3 ; i < n ; i ++ ) { int curr = first + second + third ; first = second ; second = third ; third = curr ; Console . Write ( curr + " ▁ " ) ; } } public static void Main ( ) { int n = 10 ; printTrib ( n ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Linq ; using System . Collections ; class GFG { static ArrayList SieveOfEratosthenes ( int n ) { bool [ ] prime = new bool [ n + 1 ] ; for ( int p = 2 ; p * p <= n ; p ++ ) { if ( prime [ p ] == false ) for ( int i = p * 2 ; i < n + 1 ; i += p ) prime [ i ] = true ; } ArrayList lis = new ArrayList ( ) ; for ( int p = 2 ; p <= n ; p ++ ) if ( prime [ p ] == false ) lis . Add ( p ) ; return lis ; } static int setBits ( int n ) { return ( int ) Convert . ToString ( n , 2 ) . Count ( c => c == '1' ) ; } public static void Main ( ) { int x = 4 , y = 8 ; int count = 0 ; ArrayList primeArr = new ArrayList ( ) ; primeArr = SieveOfEratosthenes ( Convert . ToInt32 ( Math . Ceiling ( Math . Log ( y , 2.0 ) ) ) ) ; for ( int i = x ; i < y + 1 ; i ++ ) { int temp = setBits ( i ) ; if ( primeArr . Contains ( temp ) ) count += 1 ; } Console . WriteLine ( count ) ; } }

Index/key variables: i, p
Accumulator variables: count, i, p
Iterator variables: i, p
Class/struct names: GFG
C# program:
using System ; public class GFG { public static int countTrailingZeroes ( int N ) { int res = ( int ) Math . Log ( N ^ ( N - 1 ) , 2.0 ) ; if ( res >= 0 ) return res ; else return 0 ; } static public void Main ( ) { int N = 12 ; Console . WriteLine ( countTrailingZeroes ( N ) ) ; } }

Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; public class GFG { static int calcScr ( List < int > arr ) { int ans = 0 ; for ( int i = 0 ; i < arr . Count ; i ++ ) ans += ( i ^ arr [ i ] ) ; return ans ; } static int getMax ( List < int > arr , int ans , List < Boolean > chosen , int N ) { if ( arr . Count == N ) { ans = Math . Max ( ans , calcScr ( arr ) ) ; return ans ; } for ( int i = 0 ; i < N ; i ++ ) { if ( chosen [ i ] ) continue ; chosen [ i ] = true ; arr . Add ( i ) ; ans = getMax ( arr , ans , chosen , N ) ; chosen [ i ] = false ; arr . Remove ( arr . Count - 1 ) ; } return ans ; } public static void Main ( String [ ] args ) { int N = 2 ; List < int > arr = new List < int > ( ) ; int ans = - 1 ; List < bool > chosen = new List < bool > ( N ) ; for ( int i = 0 ; i < N ; i ++ ) chosen . Add ( false ) ; ans = getMax ( arr , ans , chosen , N ) ; Console . Write ( ans + " STRNEWLINE " ) ; } }

Index/key variables: i
Accumulator variables: ans, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void additiveCongruentialMethod ( int Xo , int m , int c , int [ ] randomNums , int noOfRandomNums ) { randomNums [ 0 ] = Xo ; for ( int i = 1 ; i < noOfRandomNums ; i ++ ) { randomNums [ i ] = ( randomNums [ i - 1 ] + c ) % m ; } } public static void Main ( String [ ] args ) { int Xo = 3 ; int m = 15 ; int c = 2 ; int noOfRandomNums = 20 ; int [ ] randomNums = new int [ noOfRandomNums ] ; additiveCongruentialMethod ( Xo , m , c , randomNums , noOfRandomNums ) ; for ( int i = 0 ; i < noOfRandomNums ; i ++ ) { Console . Write ( randomNums [ i ] + " ▁ " ) ; } } }

Index/key variables: i, noOfRandomNums
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void findNthTerm ( int n ) { Console . WriteLine ( n * ( 4 * n + 3 ) ) ; } public static void Main ( String [ ] args ) { int N = 4 ; findNthTerm ( N ) ; } }

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

Class/struct names: GFG
C# program:
using System ; class GFG { static int HexacontatetragonNum ( int n ) { return ( 62 * n * n - 60 * n ) / 2 ; } public static void Main ( ) { int n = 3 ; Console . Write ( HexacontatetragonNum ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int Icosikaipentagon ( int n ) { return ( 23 * n * n - 21 * n ) / 2 ; } public static void Main ( ) { int n = 3 ; Console . Write ( "3rd ▁ Icosikaipentagon ▁ Number ▁ is ▁ = ▁ " + Icosikaipentagon ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int chiliagonNum ( int n ) { return ( 998 * n * n - 996 * n ) / 2 ; } public static void Main ( ) { int n = 3 ; Console . Write ( "3rd ▁ chiliagon ▁ Number ▁ is ▁ = ▁ " + chiliagonNum ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int pentacontagonNum ( int n ) { return ( 48 * n * n - 46 * n ) / 2 ; } public static void Main ( string [ ] args ) { int n = 3 ; Console . Write ( "3rd ▁ pentacontagon ▁ Number ▁ is ▁ = ▁ " + pentacontagonNum ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static int lastElement ( int [ ] arr ) { Queue < int > pq = new Queue < int > ( ) ; for ( int i = 0 ; i < arr . Length ; i ++ ) pq . Enqueue ( arr [ i ] ) ; int m1 , m2 ; while ( pq . Contains ( 0 ) ) { if ( pq . Count == 1 ) { return pq . Peek ( ) ; } m1 = pq . Dequeue ( ) ; m2 = pq . Peek ( ) ; if ( m1 != m2 ) pq . Enqueue ( m1 - m2 ) ; } return 0 ; } public static void Main ( String [ ] args ) { int [ ] arr = { 2 , 7 , 4 , 1 , 8 , 1 , 1 } ; Console . WriteLine ( lastElement ( arr ) ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { public static int formed_no ( int N , int K ) { if ( K == 1 ) { return N ; } int answer = N ; while ( K != 0 ) { int a_current = prod_of_max_min ( answer ) ; if ( a_current == 0 ) break ; answer += a_current ; } return answer ; } static int prod_of_max_min ( int n ) { int largest = 0 ; int smallest = 10 ; while ( n != 0 ) { int r = n % 10 ; largest = Math . Max ( r , largest ) ; smallest = Math . Min ( r , smallest ) ; n = n / 10 ; } return largest * smallest ; } public static void Main ( String [ ] args ) { int N = 487 , K = 100000000 ; Console . WriteLine ( formed_no ( N , K ) ) ; } }

Accumulator variables: answer
Class/struct names: GFG
C# program:
using System ; class GFG { static int countDigit ( double n ) { return ( ( int ) Math . Floor ( Math . Log10 ( n ) + 1 ) ) ; } public static void Main ( ) { double N = 80 ; Console . Write ( countDigit ( N ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double sum ( int x , int n ) { double i , total = 1.0 , multi = x ; Console . Write ( "1 ▁ " ) ; for ( i = 1 ; i < n ; i ++ ) { total = total + multi ; Console . Write ( multi ) ; Console . Write ( " ▁ " ) ; multi = multi * x ; } Console . WriteLine ( ) ; return total ; } public static void Main ( String [ ] args ) { int x = 2 ; int n = 5 ; Console . Write ( " { 0 : F2 } " , sum ( x , n ) ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { public static void Main ( ) { int N = 43 ; int ans = findRemainder ( N ) ; Console . Write ( ans ) ; } public static int findRemainder ( int n ) { int x = n & 3 ; return x ; } } is by

Class/struct names: GFG
C# program:
using System ; class autobio { public static bool isAutoBio ( int num ) { String autoStr ; int index , number , i , j , cnt ; autoStr = num . ToString ( ) ; for ( i = 0 ; i < autoStr . Length ; i ++ ) { index = Int32 . Parse ( autoStr [ i ] + " " ) ; cnt = 0 ; for ( j = 0 ; j < autoStr . Length ; j ++ ) { number = Int32 . Parse ( autoStr [ j ] + " " ) ; if ( number == i ) cnt ++ ; } if ( cnt != index ) return false ; } return true ; } public static void findAutoBios ( double n ) { double high , low ; int i , flag = 0 ; low = Math . Pow ( 10.0 , n - 1 ) ; high = Math . Pow ( 10.0 , n ) - 1.0 ; for ( i = ( int ) low ; i <= ( int ) high ; i ++ ) if ( isAutoBio ( i ) ) { flag = 1 ; Console . Write ( i + " , ▁ " ) ; } if ( flag == 0 ) Console . WriteLine ( " There ▁ is ▁ no ▁ Autobiographical ▁ Number " + " with ▁ " + ( int ) n + " ▁ digits " ) ; } public static void Main ( String [ ] args ) { double N = 0 ; findAutoBios ( N ) ; N = 4 ; findAutoBios ( N ) ; } }

Index/key variables: i, j
Accumulator variables: cnt, i, j
Iterator variables: i, j
Class/struct names: autobio
C# program:
using System ; class GFG { static void checkPalindrome ( int num ) { String str = num . ToString ( ) ; int l = 0 , r = str . Length - 1 ; while ( l < r ) { if ( str [ l ] != str [ r ] ) { Console . Write ( " No " ) ; return ; } l ++ ; r -- ; } Console . Write ( " Yes " ) ; return ; } public static void Main ( String [ ] args ) { int n = 19 , k = 3 ; checkPalindrome ( n + k ) ; } }

Index/key variables: l, r
Accumulator variables: l, r
Class/struct names: GFG
C# program:
using System ; class GFG { static int subsetSum ( int [ ] arr , int n , int i , int sum , int count ) { if ( i == n ) { if ( sum == 0 ) { count ++ ; } return count ; } count = subsetSum ( arr , n , i + 1 , sum - arr [ i ] , count ) ; count = subsetSum ( arr , n , i + 1 , sum , count ) ; return count ; } public static void Main ( String [ ] args ) { int [ ] arr = { 1 , 2 , 3 , 4 , 5 } ; int sum = 10 ; int n = arr . Length ; Console . Write ( subsetSum ( arr , n , 0 , sum , 0 ) ) ; } }

Index/key variables: i
Accumulator variables: count
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static List < int > sieve ( int n ) { List < int > prime = new List < int > ( ) ; for ( int i = 0 ; i < n + 1 ; i ++ ) prime . Add ( 0 ) ; int p = 2 ; while ( p * p <= n ) { if ( prime [ p ] == 0 ) { for ( int i = 2 * p ; i < n + 1 ; i += p ) prime [ i ] = 1 ; } p += 1 ; } List < int > allPrimes = new List < int > ( ) ; for ( int i = 2 ; i < n ; i ++ ) { if ( prime [ i ] == 0 ) allPrimes . Add ( i ) ; } return allPrimes ; } static List < int > distPrime ( List < int > arr , List < int > allPrimes ) { List < int > list1 = new List < int > ( ) ; for ( int i = 0 ; i < allPrimes . Count ; i ++ ) { for ( int j = 0 ; j < arr . Count ; j ++ ) { if ( arr [ j ] % allPrimes [ i ] == 0 ) { list1 . Add ( allPrimes [ i ] ) ; break ; } } } return list1 ; } public static void Main ( string [ ] args ) { List < int > allPrimes = new List < int > ( sieve ( 10000 ) ) ; List < int > arr = new List < int > ( ) ; arr . Add ( 15 ) ; arr . Add ( 30 ) ; arr . Add ( 60 ) ; List < int > ans = new List < int > ( distPrime ( arr , allPrimes ) ) ; Console . Write ( " [ " ) ; for ( int i = 0 ; i < ans . Count ; i ++ ) Console . Write ( ans [ i ] + " ▁ " ) ; Console . Write ( " ] " ) ; } }

Index/key variables: i, j, p
Accumulator variables: i, j, p
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int sum ( int m , int n ) { return 8 * m * n - 6 * m - 6 * n + 4 ; } public static void Main ( String [ ] args ) { int m = 3 , n = 2 ; Console . WriteLine ( sum ( m , n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int count ( int [ ] arr , int n , int k ) { Array . Sort ( arr ) ; int cnt = 0 ; int i = 0 , j = 1 ; while ( i < n && j < n ) { j = ( j <= i ) ? ( i + 1 ) : j ; while ( j < n && ( arr [ j ] - arr [ i ] ) < k ) j ++ ; cnt += ( n - j ) ; i ++ ; } return cnt ; } static public void Main ( ) { int [ ] arr = { 1 , 2 , 3 , 4 } ; int n = arr . Length ; int k = 2 ; Console . Write ( count ( arr , n , k ) ) ; } }

Index/key variables: i, j
Accumulator variables: cnt, i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static double volumeRec ( double a , double b , double e , double h ) { return ( ( ( b * h ) / 6 ) * ( 2 * a + e ) ) ; } public static void Main ( ) { double a = 2 , b = 5 , e = 5 , h = 6 ; Console . WriteLine ( " Volume ▁ = ▁ " + volumeRec ( a , b , e , h ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int count_square ( int n ) { int count = 0 ; for ( int i = 1 ; i <= n ; i = i + 2 ) { int k = n - i + 1 ; count += ( k * k ) ; } return count ; } public static void Main ( ) { int N = 8 ; Console . WriteLine ( count_square ( N ) ) ; } }

Accumulator variables: count
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int countAnomalies ( int [ ] arr , int n , int k ) { int cnt = 0 ; int i , sum = 0 ; for ( i = 0 ; i < n ; i ++ ) sum += arr [ i ] ; for ( i = 0 ; i < n ; i ++ ) if ( Math . Abs ( arr [ i ] - ( sum - arr [ i ] ) ) > k ) cnt ++ ; return cnt ; } public static void Main ( ) { int [ ] arr = { 1 , 3 , 5 } ; int n = arr . Length ; int k = 1 ; Console . WriteLine ( countAnomalies ( arr , n , k ) ) ; } }

Index/key variables: i
Accumulator variables: cnt, i, sum
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int N = 100005 ; static int [ ] d = new int [ N ] ; static int [ ] pre = new int [ N ] ; static void Positive_Divisors ( ) { for ( int i = 1 ; i < N ; i ++ ) { for ( int j = 1 ; j * j <= i ; j ++ ) { if ( i % j == 0 ) { if ( j * j == i ) d [ i ] ++ ; else d [ i ] += 2 ; } } } int ans = 0 ; for ( int i = 2 ; i < N ; i ++ ) { if ( d [ i ] == d [ i - 1 ] ) ans ++ ; pre [ i ] = ans ; } } public static void Main ( String [ ] args ) { Positive_Divisors ( ) ; int n = 15 ; Console . WriteLine ( pre [ n ] ) ; } }

Index/key variables: N, i, n
Accumulator variables: ans, i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int numLen ( int K ) { if ( K % 2 == 0 K % 5 == 0 ) return - 1 ; int number = 0 ; int len = 1 ; for ( len = 1 ; len <= K ; len ++ ) { number = number * 10 + 1 ; if ( ( number % K == 0 ) ) return len ; } return - 1 ; } static void Main ( ) { int K = 7 ; Console . WriteLine ( numLen ( K ) ) ; } }

Accumulator variables: len
Iterator variables: len
Class/struct names: GFG
C# program:
using System ; class GFG { static bool doesContainB ( int a , int b , int c ) { if ( a == b ) { return true ; } if ( ( b - a ) * c > 0 && ( b - a ) % c == 0 ) { return true ; } return false ; } public static void Main ( ) { int a = 1 , b = 7 , c = 3 ; if ( doesContainB ( a , b , c ) ) { Console . WriteLine ( " Yes " ) ; } else { Console . WriteLine ( " No " ) ; } } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void printPermutation ( int n , int k ) { for ( int i = 1 ; i <= n ; i ++ ) { int x = 2 * i - 1 ; int y = 2 * i ; if ( i <= k ) Console . Write ( y + " ▁ " + x + " ▁ " ) ; else Console . Write ( x + " ▁ " + y + " ▁ " ) ; } } public static void Main ( ) { int n = 2 , k = 1 ; printPermutation ( n , k ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int maxSum ( int N ) { int ans = 0 ; for ( int u = 1 ; u <= N ; u ++ ) { for ( int v = 1 ; v <= N ; v ++ ) { if ( u == v ) continue ; int degreeU = 2 ; if ( u == 1 u == N ) degreeU = 1 ; int degreeV = 2 ; if ( v == 1 v == N ) degreeV = 1 ; ans += ( degreeU * degreeV ) ; } } return ans ; } static void Main ( ) { int N = 6 ; Console . WriteLine ( maxSum ( N ) ) ; } }

Accumulator variables: ans, u, v
Iterator variables: u, v
Class/struct names: GFG
C# program:
using System ; using System . Collections ; using System . Linq ; class GFG { static void maximumFactor ( int [ ] arr ) { int [ ] rank = new int [ arr . Max ( ) + 1 ] ; int [ ] factors = new int [ arr . Max ( ) + 1 ] ; int g = 0 ; for ( int i = 2 ; i <= arr . Max ( ) ; i ++ ) { int count = 0 ; for ( int j = 0 ; j < arr . Length ; j ++ ) if ( arr [ j ] % i == 0 ) count += 1 ; rank [ g ] = count ; factors [ g ] = i ; g ++ ; } int m = rank . Max ( ) ; for ( int i = 0 ; i < rank . Length ; i ++ ) { if ( ( int ) rank [ i ] == m ) Console . Write ( factors [ i ] + " ▁ " ) ; } } static void Main ( ) { int [ ] arr = { 120 , 15 , 24 , 63 , 18 } ; maximumFactor ( arr ) ; } }

Index/key variables: g, i, j
Accumulator variables: count, g, i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int findSum ( int n ) { int sum = 0 ; for ( int x = 1 ; x <= n ; x ++ ) sum = sum + x ; return sum ; } public static void Main ( ) { int n = 5 ; Console . Write ( findSum ( n ) ) ; } }

Accumulator variables: x
Iterator variables: x
Class/struct names: GFG
C# program:
using System ; class GFG { public static double findMedian ( int [ ] a , int n ) { Array . Sort ( a ) ; if ( n % 2 != 0 ) return ( double ) a [ n / 2 ] ; return ( double ) ( a [ ( n - 1 ) / 2 ] + a [ n / 2 ] ) / 2.0 ; } public static void Main ( ) { int [ ] a = { 1 , 3 , 4 , 2 , 7 , 5 , 8 , 6 } ; int n = a . Length ; Console . Write ( " Median ▁ = ▁ " + findMedian ( a , n ) + " STRNEWLINE " ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { public static double findMean ( int [ ] a , int n ) { int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) sum += a [ i ] ; return ( double ) sum / ( double ) n ; } public static void Main ( ) { int [ ] a = { 1 , 3 , 4 , 2 , 7 , 5 , 8 , 6 } ; int n = a . Length ; Console . Write ( " Mean ▁ = ▁ " + findMean ( a , n ) + " STRNEWLINE " ) ; } }

Index/key variables: i
Accumulator variables: i, sum
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections ; class GFG { static bool CheckArray ( int [ ] arr , int n ) { int prod = 1 ; ArrayList freq = new ArrayList ( ) ; for ( int i = 0 ; i < n ; ++ i ) { freq . Add ( arr [ i ] ) ; prod *= arr [ i ] ; } int root = ( int ) Math . Sqrt ( prod ) ; if ( root * root == prod ) { if ( freq . Contains ( root ) & freq . LastIndexOf ( root ) != ( freq . Count ) ) { return true ; } } return false ; } public static void Main ( ) { int [ ] arr = { 1 , 2 , 12 , 3 , 2 } ; int n = arr . Length ; if ( CheckArray ( arr , n ) ) { Console . WriteLine ( " YES " ) ; } else { Console . WriteLine ( " NO " ) ; } } }

Index/key variables: i
Accumulator variables: prod
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int toK ( int N , int K ) { int w = 1 ; int s = 0 ; while ( N != 0 ) { int r = N % K ; N = N / K ; s = r * w + s ; w *= 10 ; } return s ; } static Boolean check ( int N ) { Boolean fl = false ; while ( N != 0 ) { int r = N % 10 ; N = N / 10 ; if ( fl == true && r == 0 ) return false ; if ( r > 0 ) { fl = false ; continue ; } fl = true ; } return true ; } static void hasConsecutiveZeroes ( int N , int K ) { int z = toK ( N , K ) ; if ( check ( z ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } public static void Main ( String [ ] args ) { int N = 15 ; int K = 8 ; hasConsecutiveZeroes ( N , K ) ; } }

Accumulator variables: w
Boolean variables: fl
Class/struct names: GFG
C# program:
class GFG { static int MAX = 1000000 ; static bool [ ] prime = new bool [ MAX + 1 ] ; static void SieveOfEratosthenes ( ) { prime [ 1 ] = false ; prime [ 0 ] = false ; for ( int p = 2 ; p * p <= MAX ; p ++ ) { if ( prime [ p ] == false ) { for ( int i = p * 2 ; i <= MAX ; i += p ) prime [ i ] = true ; } } } static void SumOfKthPrimes ( int [ ] arr , int n , int k ) { int c = 0 ; long sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ! prime [ arr [ i ] ] ) { c ++ ; if ( c % k == 0 ) { sum += arr [ i ] ; c = 0 ; } } } System . Console . WriteLine ( sum ) ; } static void Main ( ) { SieveOfEratosthenes ( ) ; int [ ] arr = new int [ ] { 2 , 3 , 5 , 7 , 11 } ; int n = arr . Length ; int k = 2 ; SumOfKthPrimes ( arr , n , k ) ; } }

Index/key variables: i, p
Accumulator variables: c, i, p, sum
Iterator variables: i, p
Class/struct names: GFG
C# program:
class GFG { static int MAX = 100000 ; static bool [ ] prime = new bool [ 100002 ] ; static void SieveOfEratosthenes ( ) { for ( int p = 2 ; p * p <= MAX ; p ++ ) if ( prime [ p ] == false ) for ( int i = p * 2 ; i <= MAX ; i += p ) prime [ i ] = true ; } static int superpower ( int n ) { SieveOfEratosthenes ( ) ; int superPower = 0 , factor = 0 ; int i = 2 ; while ( n > 1 && i <= MAX ) { if ( ! prime [ i ] ) { factor = 0 ; while ( n % i == 0 && n > 1 ) { factor ++ ; n = n / i ; } if ( superPower < factor ) superPower = factor ; } i ++ ; } return superPower ; } static void Main ( ) { int n = 256 ; System . Console . WriteLine ( superpower ( n ) ) ; } }

Index/key variables: i, p
Accumulator variables: factor, i, p
Iterator variables: i, p
Class/struct names: GFG
C# program:
using System ; class GFG { public class Node { public int data ; public Node next ; } static Node push ( Node head_ref , int new_data ) { Node new_node = new Node ( ) ; new_node . data = new_data ; new_node . next = ( head_ref ) ; ( head_ref ) = new_node ; return head_ref ; } 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 countPrime ( Node head_ref ) { int count = 0 ; Node ptr = head_ref ; while ( ptr != null ) { if ( isPrime ( ptr . data ) ) { count ++ ; } ptr = ptr . next ; } return count ; } public static void Main ( String [ ] args ) { Node head = null ; head = push ( head , 17 ) ; head = push ( head , 10 ) ; head = push ( head , 6 ) ; head = push ( head , 5 ) ; head = push ( head , 15 ) ; Console . Write ( " Count ▁ of ▁ prime ▁ nodes ▁ = ▁ " + countPrime ( head ) ) ; } }

Accumulator variables: count
Iterator variables: i
Class/struct names: GFG, Node
C# program:
using System ; class GFG { static int smallestDivisor ( int n ) { if ( n % 2 == 0 ) return 2 ; for ( int i = 3 ; i * i <= n ; i += 2 ) { if ( n % i == 0 ) return i ; } return n ; } static public void Main ( ) { int n = 31 ; Console . WriteLine ( smallestDivisor ( n ) ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int countRabbits ( int Heads , int Legs ) { int count = 0 ; count = ( Legs ) - 2 * ( Heads ) ; count = count / 2 ; return count ; } public static void Main ( ) { int Heads = 100 , Legs = 300 ; int Rabbits = countRabbits ( Heads , Legs ) ; Console . WriteLine ( " Rabbits ▁ = ▁ " + Rabbits ) ; Console . WriteLine ( " Pigeons ▁ = ▁ " + ( Heads - Rabbits ) ) ; } }

Class/struct names: GFG