dhyuti-n/xlcost-variable-roles huggingface dataset:
C# program:
class GFG { static int fact ( int n ) { int fact = 1 ; for ( int i = 2 ; i <= n ; i ++ ) fact *= i ; return fact ; } static int ncr ( int n , int r ) { int ncr = fact ( n ) / ( fact ( r ) * fact ( n - r ) ) ; return ncr ; } static int ways ( int m , int w , int n , int k ) { int ans = 0 ; while ( m >= k ) { ans += ncr ( m , k ) * ncr ( w , n - k ) ; k += 1 ; } return ans ; } static void Main ( ) { int m , w , n , k ; m = 7 ; w = 6 ; n = 5 ; k = 3 ; System . Console . WriteLine ( ways ( m , w , n , k ) ) ; } }

Accumulator variables: ans, fact, i, k
Iterator variables: i
Class/struct names: GFG
C# program:
class GFG { static int MAX = 1000000 ; static bool [ ] prime = new bool [ MAX + 1 ] ; static void SieveOfEratosthenes ( ) { prime [ 1 ] = true ; prime [ 0 ] = true ; 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 productOfKthPrimes ( int [ ] arr , int n , int k ) { int c = 0 ; int product = 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ! prime [ arr [ i ] ] ) { c ++ ; if ( c % k == 0 ) { product *= arr [ i ] ; c = 0 ; } } } System . Console . WriteLine ( product ) ; } static void Main ( ) { SieveOfEratosthenes ( ) ; int n = 5 , k = 2 ; int [ ] arr = new int [ ] { 2 , 3 , 5 , 7 , 11 } ; productOfKthPrimes ( arr , n , k ) ; } }

Index/key variables: i, p
Accumulator variables: c, i, p, product
Iterator variables: i, p
Class/struct names: GFG
C# program:
using System ; class gfg { public int square ( int n ) { return n * n ; } public int sum ( int n ) { if ( n == 0 ) return 0 ; if ( n % 2 == 1 ) { return square ( ( n + 1 ) / 2 ) + sum ( n / 2 ) ; } else { return square ( n / 2 ) + sum ( n / 2 ) ; } } public int oddDivSum ( int a , int b ) { return sum ( b ) - sum ( a - 1 ) ; } } class geek { public static int Main ( ) { gfg g = new gfg ( ) ; int a = 3 , b = 9 ; Console . WriteLine ( g . oddDivSum ( a , b ) ) ; return 0 ; } }

Class/struct names: geek, gfg
C# program:
using System ; class GFG { static int countBits ( int n ) { int count = 0 ; while ( n > 0 ) { count ++ ; n >>= 1 ; } return count ; } static public void Main ( ) { int n = 32 ; Console . WriteLine ( " Minimum ▁ value ▁ of ▁ K ▁ is ▁ = ▁ " + countBits ( n ) ) ; } }

Accumulator variables: count
Class/struct names: GFG
C# program:
using System ; class Geeks { static int OddDivCount ( int a , int b ) { int res = 0 ; for ( int i = a ; i <= b ; ++ i ) { int divCount = 0 ; for ( int j = 1 ; j <= i ; ++ j ) { if ( i % j == 0 ) { ++ divCount ; } } if ( ( divCount % 2 ) != 0 ) { ++ res ; } } return res ; } public static void Main ( String [ ] args ) { int a = 1 , b = 10 ; Console . WriteLine ( OddDivCount ( a , b ) ) ; } }

Iterator variables: i, j
Class/struct names: Geeks
C# program:
using System ; class GFG { static double largestSquareFactor ( double num ) { double answer = 1 ; for ( int i = 2 ; i < Math . Sqrt ( num ) ; ++ i ) { int cnt = 0 ; int j = i ; while ( num % j == 0 ) { cnt ++ ; j *= i ; } if ( ( cnt & 1 ) != 0 ) { cnt -- ; answer *= Math . Pow ( i , cnt ) ; } else { answer *= Math . Pow ( i , cnt ) ; } } return answer ; } static public void Main ( ) { int N = 420 ; Console . WriteLine ( largestSquareFactor ( N ) ) ; } }

Accumulator variables: answer, cnt, j
Iterator variables: i
Class/struct names: GFG
C# program:
class GFG { static int Nth_Term ( int n ) { return ( int ) ( 3 * System . Math . Pow ( n , 2 ) - n + 2 ) / ( 2 ) ; } static void Main ( ) { int N = 5 ; System . Console . WriteLine ( Nth_Term ( N ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void countPermutations ( int N , int B ) { int x = ( int ) Math . Pow ( B , N ) ; int y = ( int ) Math . Pow ( B , N - 1 ) ; Console . WriteLine ( x - y ) ; } public static void Main ( ) { int N = 6 ; int B = 4 ; countPermutations ( N , B ) ; } }

Class/struct names: GFG
C# program:
using System ; using System . Linq ; class GFG { static int calculateDifference ( int [ ] arr , int n ) { int max_val = arr . Max ( ) ; var prime = Enumerable . Repeat ( true , max_val + 1 ) . ToArray ( ) ; prime [ 0 ] = false ; prime [ 1 ] = false ; for ( int p = 2 ; p * p <= max_val ; p ++ ) { if ( prime [ p ] == true ) { for ( int i = p * 2 ; i <= max_val ; i += p ) prime [ i ] = false ; } } int P1 = 1 , P2 = 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( prime [ arr [ i ] ] ) { P1 *= arr [ i ] ; } else if ( arr [ i ] != 1 ) { P2 *= arr [ i ] ; } } return Math . Abs ( P2 - P1 ) ; } public static void Main ( ) { int [ ] arr = new int [ ] { 1 , 3 , 5 , 10 , 15 , 7 } ; int n = arr . Length ; Console . WriteLine ( calculateDifference ( arr , n ) ) ; } }

Index/key variables: i, p
Accumulator variables: P1, P2, i, p
Iterator variables: i, p
Class/struct names: GFG
C# program:
using System ; class GFG { static int EqualNumbers ( int [ ] a , int n ) { int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) sum += a [ i ] ; if ( sum % n != 0 ) return n - 1 ; return n ; } static public void Main ( ) { int [ ] a = { 1 , 4 , 1 } ; int n = a . Length ; Console . WriteLine ( EqualNumbers ( a , n ) ) ; } }

Index/key variables: i
Accumulator variables: i, sum
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int count_odd_pair ( int n , int [ ] a ) { int odd = 0 , even = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] % 2 == 0 ) even ++ ; else odd ++ ; } int ans = odd * even * 2 ; return ans ; } static int count_even_pair ( int odd_sum_pairs , int n ) { int total_pairs = ( n * ( n - 1 ) ) ; int ans = total_pairs - odd_sum_pairs ; return ans ; } public static void Main ( ) { int n = 6 ; int [ ] a = { 2 , 4 , 5 , 9 , 1 , 8 } ; int odd_sum_pairs = count_odd_pair ( n , a ) ; int even_sum_pairs = count_even_pair ( odd_sum_pairs , n ) ; Console . WriteLine ( " Even ▁ Sum ▁ Pairs ▁ = ▁ " + even_sum_pairs ) ; Console . WriteLine ( " Odd ▁ Sum ▁ Pairs = ▁ " + odd_sum_pairs ) ; } }

Index/key variables: i
Accumulator variables: even, i, odd
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int findSteps ( int n , int m , int [ ] a ) { int cur = 1 ; int steps = 0 ; for ( int i = 0 ; i < m ; i ++ ) { if ( a [ i ] >= cur ) steps += ( a [ i ] - cur ) ; else steps += ( n - cur + a [ i ] ) ; cur = a [ i ] ; } return steps ; } public static void Main ( ) { int n = 3 , m = 3 ; int [ ] a = { 2 , 1 , 2 } ; Console . WriteLine ( findSteps ( n , m , a ) ) ; } }

Index/key variables: i
Accumulator variables: i, steps
Iterator variables: i
Class/struct names: GFG
C# program:
class GFG { static void HexToBin ( char [ ] hexdec ) { int i = 0 ; while ( hexdec [ i ] != ' \u0000' ) { switch ( hexdec [ i ] ) { case '0' : System . Console . Write ( "0000" ) ; break ; case '1' : System . Console . Write ( "0001" ) ; break ; case '2' : System . Console . Write ( "0010" ) ; break ; case '3' : System . Console . Write ( "0011" ) ; break ; case '4' : System . Console . Write ( "0100" ) ; break ; case '5' : System . Console . Write ( "0101" ) ; break ; case '6' : System . Console . Write ( "0110" ) ; break ; case '7' : System . Console . Write ( "0111" ) ; break ; case '8' : System . Console . Write ( "1000" ) ; break ; case '9' : System . Console . Write ( "1001" ) ; break ; case ' A ' : case ' a ' : System . Console . Write ( "1010" ) ; break ; case ' B ' : case ' b ' : System . Console . Write ( "1011" ) ; break ; case ' C ' : case ' c ' : System . Console . Write ( "1100" ) ; break ; case ' D ' : case ' d ' : System . Console . Write ( "1101" ) ; break ; case ' E ' : case ' e ' : System . Console . Write ( "1110" ) ; break ; case ' F ' : case ' f ' : System . Console . Write ( "1111" ) ; break ; default : System . Console . Write ( " STRNEWLINE Invalid ▁ hexadecimal ▁ digit ▁ " + hexdec [ i ] ) ; break ; } i ++ ; } } static void Main ( ) { string s = "1AC5" ; char [ ] hexdec = new char [ 100 ] ; hexdec = s . ToCharArray ( ) ; System . Console . Write ( " Equivalent ▁ Binary ▁ value ▁ is ▁ : ▁ " ) ; try { HexToBin ( hexdec ) ; } catch ( System . IndexOutOfRangeException ) { System . Console . Write ( " " ) ; } } }

Index/key variables: i
Accumulator variables: i
Class/struct names: GFG
C# program:
using System ; public class GFG { static bool isPowerOfTwo ( int x ) { return ( x > 0 && ( ! ( ( x & ( x - 1 ) ) > 0 ) ) ) ; } static void Count_pairs ( int [ ] a , int n ) { int count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( isPowerOfTwo ( a [ i ] ) ) count ++ ; } int ans = ( count * ( count - 1 ) ) / 2 ; Console . WriteLine ( ans ) ; } static public void Main ( ) { int [ ] a = { 2 , 5 , 8 , 16 , 128 } ; int n = a . Length ; Count_pairs ( a , n ) ; } }

Index/key variables: i
Accumulator variables: count, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; public class GFG { static int factorial ( int n ) { int result = 1 ; for ( int i = 1 ; i <= n ; i ++ ) result = result * i ; return result ; } static int nCr ( int n , int r ) { return factorial ( n ) / ( factorial ( r ) * factorial ( n - r ) ) ; } static int calculate_result ( int n ) { int result = 2 * nCr ( ( n - 2 ) , ( n / 2 - 1 ) ) ; return result ; } public static void Main ( ) { int a = 2 , b = 4 ; Console . WriteLine ( calculate_result ( 2 * a ) ) ; Console . Write ( calculate_result ( 2 * b ) ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void PossibleValues ( int b , int x , int n ) { int leastdivisible = ( b / x + 1 ) * x ; int flag = 1 ; while ( leastdivisible <= n ) { if ( leastdivisible - b >= 1 ) { Console . Write ( leastdivisible - b + " ▁ " ) ; leastdivisible += x ; flag = 0 ; } else break ; } if ( flag > 0 ) Console . WriteLine ( - 1 ) ; } public static void Main ( ) { int b = 10 , x = 6 , n = 40 ; PossibleValues ( b , x , n ) ; } }

Accumulator variables: leastdivisible
Class/struct names: GFG
C# program:
using System ; using System . Collections ; using System . Collections . Generic ; public class GFG { static int digitProduct ( int [ ] digits , int start , int end ) { int pro = 1 ; for ( int i = start ; i <= end ; i ++ ) { pro *= digits [ i ] ; } return pro ; } static bool isDistinct ( int N ) { string s = N . ToString ( ) ; int len = s . Length ; int [ ] digits = new int [ len ] ; ArrayList products = new ArrayList ( ) ; for ( int i = 0 ; i < len ; i ++ ) { digits [ i ] = s [ i ] - '0' ; } for ( int i = 0 ; i < len ; i ++ ) { for ( int j = i ; j < len ; j ++ ) { int val = digitProduct ( digits , i , j ) ; if ( products . Contains ( val ) ) return false ; else products . Add ( val ) ; } } return true ; } public static void Main ( ) { int N = 324 ; if ( isDistinct ( N ) ) Console . WriteLine ( " YES " ) ; else Console . WriteLine ( " NO " ) ; } }

Index/key variables: i, len
Accumulator variables: i, j, pro
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static readonly int MAX = 10000 ; static List < int > arr = new List < int > ( ) ; static void ulam ( ) { HashSet < int > s = new HashSet < int > ( ) ; arr . Add ( 1 ) ; s . Add ( 1 ) ; arr . Add ( 2 ) ; s . Add ( 2 ) ; for ( int i = 3 ; i < MAX ; i ++ ) { int count = 0 ; for ( int j = 0 ; j < arr . Count ; j ++ ) { if ( s . Contains ( i - arr [ j ] ) && arr [ j ] != ( i - arr [ j ] ) ) count ++ ; if ( count > 2 ) break ; } if ( count == 2 ) { arr . Add ( i ) ; s . Add ( i ) ; } } } public static void Main ( String [ ] args ) { ulam ( ) ; int n = 9 ; Console . WriteLine ( arr [ n - 1 ] ) ; } }

Index/key variables: j
Accumulator variables: count, i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static long nthHilbertNumber ( int n ) { return 4 * ( n - 1 ) + 1 ; } public static void Main ( ) { int n = 5 ; Console . WriteLine ( nthHilbertNumber ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static long nthKyneaNumber ( int n ) { n = ( 1 << n ) + 1 ; n = n * n ; n = n - 2 ; return n ; } public static void Main ( ) { int n = 2 ; Console . WriteLine ( nthKyneaNumber ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static long nthKyneaNumber ( int n ) { return ( ( 1 << ( 2 * n ) ) + ( 1 << ( n + 1 ) ) - 1 ) ; } public static void Main ( ) { int n = 2 ; Console . WriteLine ( nthKyneaNumber ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static bool isPowerOfTwo ( int n ) { return n != 0 && ( ( n & ( n - 1 ) ) == 0 ) ; } static bool isProthNumber ( int n ) { int k = 1 ; while ( k < ( n / k ) ) { if ( n % k == 0 ) { if ( isPowerOfTwo ( n / k ) ) return true ; } k = k + 2 ; } return false ; } public static void Main ( ) { int n = 25 ; if ( isProthNumber ( n - 1 ) ) Console . WriteLine ( " YES " ) ; else Console . WriteLine ( " NO " ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int get_last_two_digit ( long N ) { if ( N <= 10 ) { long ans = 0 , fac = 1 ; for ( int i = 1 ; i <= N ; i ++ ) { fac = fac * i ; ans += fac ; } return ( int ) ans % 100 ; } return 13 ; } public static void Main ( ) { long N = 1 ; for ( N = 1 ; N <= 10 ; N ++ ) Console . WriteLine ( " For ▁ N ▁ = ▁ " + N + " ▁ : ▁ " + get_last_two_digit ( N ) ) ; } }

Accumulator variables: N, ans, i
Iterator variables: N, i
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isProductEven ( int [ ] arr , int n ) { for ( int i = 0 ; i < n ; i ++ ) if ( ( arr [ i ] & 1 ) == 0 ) return true ; return false ; } public static void Main ( ) { int [ ] arr = { 2 , 4 , 3 , 5 } ; int n = arr . Length ; if ( isProductEven ( arr , n ) ) Console . WriteLine ( " Even " ) ; else Console . WriteLine ( " Odd " ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; public class Improve { static int calculateSquareSum ( int n ) { if ( n <= 0 ) return 0 ; int [ ] fibo = new int [ n + 1 ] ; fibo [ 0 ] = 0 ; fibo [ 1 ] = 1 ; int sum = ( fibo [ 0 ] * fibo [ 0 ] ) + ( fibo [ 1 ] * fibo [ 1 ] ) ; for ( int i = 2 ; i <= n ; i ++ ) { fibo [ i ] = fibo [ i - 1 ] + fibo [ i - 2 ] ; sum += ( fibo [ i ] * fibo [ i ] ) ; } return sum ; } public static void Main ( ) { int n = 6 ; Console . Write ( " Sum ▁ of ▁ squares ▁ of ▁ Fibonacci ▁ numbers ▁ is ▁ : ▁ " + calculateSquareSum ( n ) ) ; } }

Index/key variables: i
Accumulator variables: i, sum
Iterator variables: i
Class/struct names: Improve
C# program:
using System ; class GFG { static int fnMod ( int n ) { int rem = n % 4 ; if ( rem == 0 rem == 3 ) return 0 ; else if ( rem == 1 rem == 2 ) return 1 ; return 0 ; } public static void Main ( ) { int n = 6 ; Console . Write ( fnMod ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int MinimumMoves ( int [ ] a , int n , int x ) { int ans = 0 ; for ( int i = 1 ; i < n ; i ++ ) { if ( a [ i ] <= a [ i - 1 ] ) { int p = ( a [ i - 1 ] - a [ i ] ) / x + 1 ; ans += p ; a [ i ] += p * x ; } } return ans ; } public static void Main ( ) { int [ ] arr = { 1 , 3 , 3 , 2 } ; int x = 2 ; int n = arr . Length ; Console . Write ( MinimumMoves ( arr , n , x ) ) ; } }

Index/key variables: i
Accumulator variables: ans, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int SumOfDigits ( String str , int n ) { int sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) sum += ( int ) ( str [ i ] - '0' ) ; return sum ; } static bool Divisible ( String str , int n ) { if ( SumOfDigits ( str , n ) % 3 == 0 && str [ n - 1 ] == '0' ) return true ; return false ; } public static void Main ( ) { String str = "263730746028908374890" ; int n = str . Length ; if ( Divisible ( str , n ) ) Console . WriteLine ( " YES " ) ; else Console . WriteLine ( " NO " ) ; } }

Index/key variables: i
Accumulator variables: i, sum
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isPrime ( int k ) { if ( k <= 1 ) return false ; for ( int i = 2 ; i < k ; i ++ ) if ( k % i == 0 ) return false ; return true ; } static int check ( int num , int k ) { int flag = 1 ; for ( int i = 2 ; i < k ; i ++ ) { if ( num % i == 0 ) flag = 0 ; } if ( flag == 1 ) { if ( num % k == 0 ) return 1 ; else return 0 ; } else return 0 ; } static int findCount ( int a , int b , int k ) { int count = 0 ; if ( ! isPrime ( k ) ) return 0 ; else { int ans ; for ( int i = a ; i <= b ; i ++ ) { ans = check ( i , k ) ; if ( ans == 1 ) count ++ ; else continue ; } } return count ; } public static void Main ( ) { int a = 2020 , b = 6300 , k = 29 ; Console . WriteLine ( findCount ( a , b , k ) ) ; } }

Accumulator variables: count, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections ; class GFG { static int findLargest ( int n , ArrayList v ) { int flag = 0 ; long sum = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( ( int ) v [ i ] == 0 ) flag = 1 ; sum += ( int ) v [ i ] ; } if ( flag != 1 ) Console . WriteLine ( " Not ▁ possible " ) ; else { v . Sort ( ) ; v . Reverse ( ) ; if ( ( int ) v [ 0 ] == 0 ) { Console . WriteLine ( "0" ) ; return 0 ; } else { int flags = 0 ; int y = ( int ) ( sum % 3 ) ; if ( y != 0 ) { for ( int i = n - 1 ; i >= 0 ; i -- ) { if ( ( int ) v [ i ] % 3 == y ) { v . RemoveAt ( i ) ; flags = 1 ; break ; } } if ( flags == 0 ) { y = 3 - y ; int cnt = 0 ; for ( int i = n - 1 ; i >= 0 ; i -- ) { if ( ( int ) v [ i ] % 3 == y ) { v . RemoveAt ( i ) ; cnt ++ ; if ( cnt >= 2 ) break ; } } } } if ( ( int ) v [ 0 ] == 0 ) Console . WriteLine ( "0" ) ; else for ( int i = 0 ; i < v . Count ; i ++ ) { Console . Write ( v [ i ] ) ; } } } return int . MinValue ; } static void Main ( ) { int [ ] arr = { 3 , 9 , 9 , 6 , 4 , 3 , 6 , 4 , 9 , 6 , 0 } ; int n = 11 ; ArrayList v = new ArrayList ( ) ; for ( int i = 0 ; i < n ; i ++ ) v . Add ( arr [ i ] ) ; findLargest ( n , v ) ; } }

Index/key variables: i
Accumulator variables: cnt, i, sum
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static void findkth ( int n , int k ) { List < int > v1 = new List < int > ( ) ; List < int > v2 = new List < int > ( ) ; for ( int i = 1 ; i <= Math . Sqrt ( n ) ; i ++ ) { if ( n % i == 0 ) { v1 . Add ( i ) ; if ( i != Math . Sqrt ( n ) ) v2 . Add ( n / i ) ; } } v2 . Reverse ( ) ; if ( k > ( v1 . Count + v2 . Count ) ) Console . Write ( " Doesn ' t ▁ Exist " ) ; else { if ( k <= v1 . Count ) Console . Write ( v1 [ k - 1 ] ) ; else Console . Write ( v2 [ k - v1 . Count - 1 ] ) ; } } public static void Main ( String [ ] args ) { int n = 15 , k = 2 ; findkth ( n , k ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int NumberOfSolutions ( int a , int b , int c , int d ) { int ans = 0 ; for ( int i = a ; i <= b ; i ++ ) if ( d >= Math . Max ( c , i + 1 ) ) ans += d - Math . Max ( c , i + 1 ) + 1 ; return ans ; } public static void Main ( ) { int a = 2 , b = 3 , c = 3 , d = 4 ; Console . WriteLine ( NumberOfSolutions ( a , b , c , d ) ) ; } }

Accumulator variables: ans, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static long findF_N ( long n ) { long ans = 0 ; for ( long i = 0 ; i < n ; ++ i ) ans += ( i + 1 ) * ( n - i - 1 ) ; return ans ; } public static void Main ( ) { long n = 3 ; Console . WriteLine ( findF_N ( n ) ) ; } }

Accumulator variables: ans
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static string findNumber ( int n , int d ) { string ans = " " ; if ( d != 10 ) { ans += d . ToString ( ) ; for ( int i = 1 ; i < n ; i ++ ) ans += '0' ; } else { if ( n == 1 ) ans += " Impossible " ; else { ans += '1' ; for ( int i = 1 ; i < n ; i ++ ) ans += '0' ; } } return ans ; } public static void Main ( ) { int n = 12 , d = 3 ; Console . WriteLine ( findNumber ( n , d ) ) ; } }

Accumulator variables: ans, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int MAX = 1000000 ; static int [ ] sieve_Prime = new int [ MAX + 4 ] ; static int [ ] sieve_count = new int [ MAX + 4 ] ; static void form_sieve ( ) { sieve_Prime [ 1 ] = 1 ; for ( int i = 2 ; i <= MAX ; i ++ ) { if ( sieve_Prime [ i ] == 0 ) { for ( int j = i * 2 ; j <= MAX ; j += i ) { if ( sieve_Prime [ j ] == 0 ) { sieve_Prime [ j ] = 1 ; sieve_count [ i ] ++ ; } } } } } public static void Main ( ) { form_sieve ( ) ; int n = 2 ; Console . WriteLine ( " Count ▁ = ▁ " + ( sieve_count [ n ] + 1 ) ) ; n = 3 ; Console . WriteLine ( " Count ▁ = ▁ " + ( sieve_count [ n ] + 1 ) ) ; } }

Index/key variables: i, j, n
Accumulator variables: i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { public static void Main ( String [ ] args ) { int [ , ] matrix = new int [ 5 , 5 ] ; int row_index , column_index , x = 0 , size = 5 ; for ( row_index = 0 ; row_index < size ; row_index ++ ) { for ( column_index = 0 ; column_index < size ; column_index ++ ) { matrix [ row_index , column_index ] = ++ x ; } } Console . Write ( " The ▁ matrix ▁ is STRNEWLINE " ) ; for ( row_index = 0 ; row_index < size ; row_index ++ ) { for ( column_index = 0 ; column_index < size ; column_index ++ ) { Console . Write ( " { 0 } TABSYMBOL " , matrix [ row_index , column_index ] ) ; } Console . Write ( " STRNEWLINE " ) ; } Console . Write ( " on Secondary : " for ( row_index = 0 ; < size ; ++ ) { for ( column_index = 0 ; < size ; ++ ) { if ( ( row_index + column_index ) == size - 1 ) Console . Write ( " { 0 } , ▁ " , matrix [ row_index , column_index ] ) ; } } } }

Accumulator variables: column_index, row_index
Iterator variables: column_index, row_index
Class/struct names: GFG
C# program:
using System ; class GFG { public static void Main ( String [ ] args ) { int [ , ] matrix = new int [ 5 , 5 ] ; int row_index , column_index , x = 0 , size = 5 ; for ( row_index = 0 ; row_index < size ; row_index ++ ) { for ( column_index = 0 ; column_index < size ; column_index ++ ) { matrix [ row_index , column_index ] = ++ x ; } } Console . Write ( " The ▁ matrix ▁ is STRNEWLINE " ) ; for ( row_index = 0 ; row_index < size ; row_index ++ ) { for ( column_index = 0 ; column_index < size ; column_index ++ ) { Console . Write ( " { 0 } TABSYMBOL " , matrix [ row_index , column_index ] ) ; } Console . Write ( " STRNEWLINE " ) ; } Console . Write ( " STRNEWLINE Elements ▁ above ▁ Secondary " + " ▁ diagonal ▁ are : STRNEWLINE " ) ; for ( row_index = 0 ; row_index < size ; row_index ++ ) { for ( column_index = 0 ; column_index < size ; column_index ++ ) { if ( ( row_index + column_index ) < size - 1 ) Console . Write ( " { 0 } , ▁ " , matrix [ row_index , column_index ] ) ; } } } }

Accumulator variables: column_index, row_index
Iterator variables: column_index, row_index
Class/struct names: GFG
C# program:
using System ; class GFG { public static void Main ( String [ ] args ) { int [ , ] matrix = new int [ 5 , 5 ] ; int row_index , column_index , x = 0 , size = 5 ; for ( row_index = 0 ; row_index < size ; row_index ++ ) { for ( column_index = 0 ; column_index < size ; column_index ++ ) { matrix [ row_index , column_index ] = ++ x ; } } Console . Write ( " The ▁ matrix ▁ is STRNEWLINE " ) ; for ( row_index = 0 ; row_index < size ; row_index ++ ) { for ( column_index = 0 ; column_index < size ; column_index ++ ) { Console . Write ( " { 0 } TABSYMBOL " , matrix [ row_index , column_index ] ) ; } Console . Write ( " STRNEWLINE " ) ; } Console . Write ( " STRNEWLINE Corner ▁ Elements ▁ are : STRNEWLINE " ) ; for ( row_index = 0 ; row_index < size ; row_index ++ ) { for ( column_index = 0 ; column_index < size ; column_index ++ ) { if ( ( row_index == 0 row_index == size - 1 ) && ( column_index == 0 column_index == size - 1 ) ) Console . Write ( " { 0 } , ▁ " , matrix [ row_index , column_index ] ) ; } } } }

Accumulator variables: column_index, row_index
Iterator variables: column_index, row_index
Class/struct names: GFG