dhyuti-n/xlcost-variable-roles huggingface dataset:
C# program:
using System ; class GFG { static String GeberateDefangIP ( string str ) { string defangIP = " " ; for ( int i = 0 ; i < str . Length ; i ++ ) { char c = str [ i ] ; if ( c == ' . ' ) { defangIP += " [ . ] " ; } else { defangIP += c ; } } return defangIP ; } public static void Main ( ) { string str = "255.100.50.0" ; Console . Write ( GeberateDefangIP ( str ) ) ; } }

Index/key variables: i
Accumulator variables: defangIP, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static string generateTheString ( int n ) { string ans = " " ; if ( n % 2 == 0 ) { for ( int i = 0 ; i < Math . Min ( n , 24 ) ; i ++ ) { ans += ( char ) ( ' b ' + i ) ; } if ( n > 24 ) { for ( int i = 0 ; i < ( n - 24 ) ; i ++ ) ans += ' a ' ; } } else { for ( int i = 0 ; i < Math . Min ( n , 25 ) ; i ++ ) { ans += ( char ) ( ' b ' + i ) ; } if ( n > 25 ) { for ( int i = 0 ; i < ( n - 25 ) ; i ++ ) ans += ' a ' ; } } return ans ; } public static void Main ( ) { int n = 34 ; Console . Write ( generateTheString ( n ) ) ; } }

Accumulator variables: ans, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void moveAtEnd ( string s , int i , int l ) { if ( i >= l ) return ; char curr = s [ i ] ; if ( curr != ' x ' ) Console . Write ( curr ) ; moveAtEnd ( s , i + 1 , l ) ; if ( curr == ' x ' ) Console . Write ( curr ) ; return ; } public static void Main ( ) { string s = " geekxsforgexxeksxx " ; int l = s . Length ; moveAtEnd ( s , 0 , l ) ; } }

Index/key variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void String ( int l , int x , int y ) { int p = 97 ; for ( int j = 0 ; j < l ; j ++ ) { char ans = ( char ) ( p + ( j % y ) ) ; Console . Write ( ans ) ; } } public static void Main ( string [ ] args ) { int l = 6 ; int x = 5 ; int y = 3 ; String ( l , x , y ) ; } }

Accumulator variables: j
Iterator variables: j
Class/struct names: GFG
C# program:
using System ; class GFG { static void finalCoordinates ( int SX , int SY , char [ ] D ) { for ( int i = 0 ; i < D . Length ; i ++ ) { if ( D [ i ] == ' N ' ) { SY += 1 ; } else if ( D [ i ] == ' S ' ) { SY -= 1 ; } else if ( D [ i ] == ' E ' ) { SX += 1 ; } else { SX -= 1 ; } } String ans = ' ( ' + String . Join ( " " , SX ) + ' , ' + String . Join ( " " , SY ) + ' ) ' ; Console . Write ( ans ) ; } public static void Main ( String [ ] args ) { int SX = 2 , SY = 2 ; String D = " NSSE " ; finalCoordinates ( SX , SY , D . ToCharArray ( ) ) ; } }

Index/key variables: i
Accumulator variables: SX, SY, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void shortestPalindrome ( string s ) { int [ ] abcd = new int [ 26 ] ; for ( int i = 0 ; i < s . Length ; i ++ ) abcd [ s [ i ] - 97 ] = 1 ; for ( int i = 0 ; i < 26 ; i ++ ) { if ( abcd [ i ] == 1 ) { Console . Write ( ( char ) ( i + 97 ) + " ▁ " ) ; } } } static public void Main ( string [ ] args ) { string s = " geeksforgeeks " ; shortestPalindrome ( s ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static String removeDuplicates ( String str ) { int n = str . Length ; String res = " " ; for ( int i = 0 ; i < n ; i ++ ) { int j ; for ( j = i + 1 ; j < n ; j ++ ) if ( str [ i ] == str [ j ] ) break ; if ( j == n ) res = res + str [ i ] ; } return res ; } public static void Main ( String [ ] args ) { String str = " geeksforgeeks " ; Console . Write ( removeDuplicates ( str ) ) ; } }

Index/key variables: i, j
Accumulator variables: i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static String removeDuplicates ( String str ) { int n = str . Length ; HashSet < char > s = new HashSet < char > ( ) ; String res = " " ; for ( int i = n - 1 ; i >= 0 ; i -- ) { if ( ! s . Contains ( str [ i ] ) ) { res = res + str [ i ] ; s . Add ( str [ i ] ) ; } } res = reverse ( res ) ; return res ; } static String reverse ( String input ) { char [ ] a = input . ToCharArray ( ) ; int l , r = a . Length - 1 ; for ( l = 0 ; l < r ; l ++ , r -- ) { char temp = a [ l ] ; a [ l ] = a [ r ] ; a [ r ] = temp ; } return String . Join ( " " , a ) ; } public static void Main ( String [ ] args ) { String str = " geeksforgeeks " ; Console . Write ( removeDuplicates ( str ) ) ; } }

Index/key variables: i, l, r
Accumulator variables: i, l, r
Iterator variables: i, l
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static void contain ( int L , int U , int M ) { int count = 0 ; for ( int j = L ; j < U ; j ++ ) { HashSet < string > num = new HashSet < string > ( ) ; string str = j . ToString ( ) ; num . Add ( str ) ; if ( j % M == 0 && ! num . Contains ( M . ToString ( ) ) ) { count += 1 ; } } Console . Write ( count - 2 ) ; } public static void Main ( string [ ] args ) { int L = 106 ; int U = 200 ; int M = 7 ; contain ( L , U , M ) ; } }

Accumulator variables: count, j
Iterator variables: j
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static int max1 = 0 ; static int MaxLength ( List < String > v , int i , int m ) { if ( i >= m ) { return m - 1 ; } for ( int k = 0 ; k < 26 ; k ++ ) { char c = ( char ) ( ' a ' + k ) ; List < String > v1 = new List < String > ( ) ; for ( int j = 0 ; j < v . Count ; j ++ ) { if ( v [ j ] [ i ] == c ) { v1 . Add ( v [ j ] ) ; } } if ( v1 . Count >= 2 ) { max1 = Math . Max ( max1 , MaxLength ( v1 , i + 1 , m ) ) ; } else { max1 = Math . Max ( max1 , i - 1 ) ; } } return max1 ; } public static void Main ( String [ ] args ) { String s1 , s2 , s3 , s4 , s5 ; s1 = " abcde " ; s2 = " abcsd " ; s3 = " bcsdf " ; s4 = " abcda " ; s5 = " abced " ; List < String > v = new List < String > ( ) ; v . Add ( s1 ) ; v . Add ( s2 ) ; v . Add ( s3 ) ; v . Add ( s4 ) ; v . Add ( s5 ) ; int m = v [ 0 ] . Length ; Console . Write ( MaxLength ( v , 0 , m ) + 1 ) ; } }

Index/key variables: i, j
Accumulator variables: j, k
Iterator variables: j, k
Class/struct names: GFG
C# program:
using System ; class GFG { static void findPeriodicString ( string S ) { int l = 2 * S . Length ; int count = 0 ; for ( int i = 0 ; i < S . Length ; i ++ ) { if ( S [ i ] == '1' ) count ++ ; } if ( count == S . Length count == 0 ) Console . WriteLine ( S ) ; else { char [ ] arr = new char [ l ] ; for ( int i = 0 ; i < l ; i += 2 ) { arr [ i ] = '1' ; arr [ i + 1 ] = '0' ; } for ( int i = 0 ; i < l ; i ++ ) Console . Write ( arr [ i ] ) ; Console . WriteLine ( ) ; } } public static void Main ( ) { string S = "1111001" ; findPeriodicString ( S ) ; } }

Index/key variables: i, l
Accumulator variables: count, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void group_formed ( String S ) { int count = 1 ; for ( int i = 0 ; i < S . Length - 1 ; i ++ ) { if ( S [ i ] != S [ i + 1 ] ) count += 1 ; } Console . Write ( count ) ; } public static void Main ( String [ ] args ) { String S = " TTWWW " ; group_formed ( S ) ; } }

Index/key variables: i
Accumulator variables: count, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; public class GFG { static int value ( char x ) { return ( int ) ( x - ' a ' ) ; } static String maximumProduct ( String str , int n ) { String answer = " " , curr = " " ; long maxProduct = 0 , product = 1 ; for ( int i = 0 ; i < n ; i ++ ) { product *= 1L * value ( str [ i ] ) ; curr += str [ i ] ; if ( product >= maxProduct ) { maxProduct = product ; answer = curr ; } if ( product == 0 ) { product = 1 ; curr = " " ; } } return answer ; } public static void Main ( String [ ] args ) { String str = " sdtfakdhdahdzz " ; int n = str . Length ; Console . Write ( maximumProduct ( str , n ) + " STRNEWLINE " ) ; } }

Index/key variables: i
Accumulator variables: curr, i, product
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void solve ( char [ ] a , char [ ] b ) { int l = a . Length ; int min = 0 , max = 0 ; for ( int i = 0 ; i < l ; i ++ ) { if ( a [ i ] == ' + ' b [ i ] == ' + ' a [ i ] != b [ i ] ) max ++ ; if ( a [ i ] != ' + ' && b [ i ] != ' + ' && a [ i ] != b [ i ] ) min ++ ; } Console . Write ( min + max + " STRNEWLINE " ) ; } public static void Main ( String [ ] args ) { String s1 = " a + c " , s2 = " + + b " ; solve ( s1 . ToCharArray ( ) , s2 . ToCharArray ( ) ) ; } }

Index/key variables: i
Accumulator variables: i, max, min
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int noOfDeletions ( String str , char k ) { int ans = 0 , cnt = 0 , pos = 0 ; while ( pos < str . Length && str [ pos ] != k ) { pos ++ ; } int i = pos ; while ( i < str . Length ) { while ( i < str . Length && str [ i ] == k ) { i = i + 1 ; } ans = ans + cnt ; cnt = 0 ; while ( i < str . Length && str [ i ] != k ) { i = i + 1 ; cnt = cnt + 1 ; } } return ans ; } public static void Main ( String [ ] args ) { String str1 = " ababababa " ; char k1 = ' a ' ; Console . Write ( noOfDeletions ( str1 , k1 ) + " STRNEWLINE " ) ; String str2 = " kprkkoinkopt " ; char k2 = ' k ' ; Console . Write ( noOfDeletions ( str2 , k2 ) + " STRNEWLINE " ) ; } }

Index/key variables: i, pos
Accumulator variables: pos
Class/struct names: GFG
C# program:
using System ; class GFG { static int val ( char c ) { if ( c >= '0' && c <= '9' ) return ( int ) c - '0' ; else return ( int ) c - ' A ' + 10 ; } static int toDeci ( String str , int Base ) { int len = str . Length ; int power = 1 ; int num = 0 ; int i ; for ( i = len - 1 ; i >= 0 ; i -- ) { if ( val ( str [ i ] ) >= Base ) { return - 1 ; } num += val ( str [ i ] ) * power ; power = power * Base ; } return num ; } static void checkCorrespond ( String [ ] str , int x ) { int counter = 0 ; int n = str . Length ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 2 ; j <= 36 ; j ++ ) { if ( toDeci ( str [ i ] , j ) == x ) { counter ++ ; break ; } } } if ( counter == n ) Console . Write ( " YES " + " STRNEWLINE " ) ; else Console . Write ( " NO " + " STRNEWLINE " ) ; } public static void Main ( String [ ] args ) { int x = 16 ; String [ ] str = { "10000" , "20" , "16" } ; checkCorrespond ( str , x ) ; } }

Index/key variables: i
Accumulator variables: counter, i, j, num
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int LexicoLesserStrings ( String s ) { int count = 0 ; int len ; len = s . Length ; for ( int i = 0 ; i < len ; i ++ ) { count += ( ( s [ i ] - ' a ' ) * ( int ) Math . Pow ( 26 , len - i - 1 ) ) ; } return count ; } static int countString ( String S1 , String S2 ) { int countS1 , countS2 , totalString ; countS1 = LexicoLesserStrings ( S1 ) ; countS2 = LexicoLesserStrings ( S2 ) ; totalString = countS2 - countS1 - 1 ; return ( totalString < 0 ? 0 : totalString ) ; } public static void Main ( ) { String S1 , S2 ; S1 = " cda " ; S2 = " cef " ; Console . Write ( countString ( S1 , S2 ) ) ; } }

Index/key variables: i
Accumulator variables: count, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isVowel ( char x ) { x = char . ToLower ( x ) ; return ( x == ' a ' x == ' e ' x == ' i ' x == ' o ' x == ' u ' ) ; } static String longestVowelSubsequence ( String str ) { String answer = " " ; int n = str . Length ; for ( int i = 0 ; i < n ; i ++ ) { if ( isVowel ( str [ i ] ) ) { answer += str [ i ] ; } } return answer ; } public static void Main ( String [ ] args ) { String str = " geeksforgeeks " ; Console . Write ( longestVowelSubsequence ( str ) + " STRNEWLINE " ) ; } }

Index/key variables: i
Accumulator variables: answer, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static void findMaxFrequency ( String s ) { int [ ] arr = new int [ 26 ] ; for ( int i = 0 ; i < s . Length ; i ++ ) arr [ s [ i ] - ' a ' ] ++ ; Dictionary < int , int > hash = new Dictionary < int , int > ( ) ; for ( int i = 0 ; i < 26 ; i ++ ) if ( arr [ i ] != 0 ) { if ( hash . ContainsKey ( arr [ i ] ) ) { hash [ arr [ i ] ] = hash [ arr [ i ] ] + 1 ; } else { hash . Add ( arr [ i ] , 1 ) ; } } int max_count = 0 , res = - 1 ; foreach ( KeyValuePair < int , int > i in hash ) { if ( max_count < i . Value ) { res = i . Key ; max_count = i . Value ; } } Console . WriteLine ( " Frequency ▁ " + res + " ▁ is ▁ repeated ▁ " + max_count + " ▁ times " ) ; } public static void Main ( String [ ] args ) { String s = " geeksgeeks " ; findMaxFrequency ( s ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void findString ( string A , string B ) { int dist = 0 ; for ( int i = 0 ; i < A . Length ; i ++ ) { if ( A [ i ] != B [ i ] ) dist ++ ; } if ( ( dist & 1 ) == 1 ) { Console . WriteLine ( " Not ▁ Possible " ) ; } else { string res = " " ; int K = ( int ) dist / 2 ; for ( int i = 0 ; i < A . Length ; i ++ ) { if ( A [ i ] != B [ i ] && K > 0 ) { res += B [ i ] ; K -- ; } else if ( A [ i ] != B [ i ] ) { res += A [ i ] ; } else { res += A [ i ] ; } } Console . WriteLine ( res ) ; } } public static void Main ( string [ ] args ) { string A = "1001010" ; string B = "0101010" ; findString ( A , B ) ; } }

Index/key variables: i
Accumulator variables: K, dist, i, res
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void maximumSuffix ( String s , int n , int k ) { int i = s . Length - 1 ; int [ ] arr = new int [ 26 ] ; String suffix = " " ; while ( i > - 1 ) { int index = s [ i ] - ' a ' ; if ( arr [ index ] < n ) { arr [ index ] ++ ; suffix += s [ i ] ; i -- ; continue ; } if ( k == 0 ) break ; k -- ; i -- ; } suffix = reverse ( suffix ) ; Console . Write ( suffix ) ; } static String reverse ( String input ) { char [ ] a = input . ToCharArray ( ) ; int l , r = a . Length - 1 ; for ( l = 0 ; l < r ; l ++ , r -- ) { char temp = a [ l ] ; a [ l ] = a [ r ] ; a [ r ] = temp ; } return String . Join ( " " , a ) ; } public static void Main ( String [ ] args ) { String str = " iahagafedcba " ; int n = 1 , k = 2 ; maximumSuffix ( str , n , k ) ; } }

Index/key variables: i, index, l, r
Accumulator variables: i, k, l, r, suffix
Iterator variables: l
Class/struct names: GFG
C# program:
using System ; class GFG { static string xoring ( string a , string b , int n ) { string ans = " " ; for ( int i = 0 ; i < n ; i ++ ) { if ( a [ i ] == b [ i ] ) ans += "0" ; else ans += "1" ; } return ans ; } static public void Main ( ) { string a = "1010" ; string b = "1101" ; int n = a . Length ; string c = xoring ( a , b , n ) ; Console . WriteLine ( c ) ; } }

Index/key variables: i
Accumulator variables: ans, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void kthString ( int n , int k ) { int total = 0 ; int i = 1 ; while ( total < k ) { total = total + n - i ; i ++ ; } int first_y_position = i - 1 ; int second_y_position = k - ( total - n + first_y_position ) ; int j ; for ( j = 1 ; j < first_y_position ; j ++ ) Console . Write ( " x " ) ; Console . Write ( " y " ) ; j = first_y_position + 1 ; while ( second_y_position > 1 ) { Console . Write ( " x " ) ; second_y_position -- ; j ++ ; } Console . Write ( " y " ) ; while ( j < n ) { Console . Write ( " x " ) ; j ++ ; } } static public void Main ( ) { int n = 5 ; int k = 7 ; kthString ( n , k ) ; } }

Accumulator variables: i, j, second_y_position
Iterator variables: j
Class/struct names: GFG
C# program:
using System ; class GFG { static String findLargest ( int N ) { String largest = strings ( N , '7' ) ; return largest ; } static String findSmallest ( int N ) { String smallest = "1" + strings ( ( N - 1 ) , '0' ) ; return smallest ; } private static String strings ( int N , char c ) { String temp = " " ; for ( int i = 0 ; i < N ; i ++ ) { temp += c ; } return temp ; } static void printLargestSmallest ( int N ) { Console . Write ( " Largest : ▁ " + findLargest ( N ) + " STRNEWLINE " ) ; Console . Write ( " Smallest : ▁ " + findSmallest ( N ) + " STRNEWLINE " ) ; } public static void Main ( String [ ] args ) { int N = 4 ; printLargestSmallest ( N ) ; } }

Accumulator variables: i, temp
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static long countSubstr ( String s , int k ) { int n = s . Length ; int l = n - 1 ; int r = n - 1 ; int [ ] arr = new int [ n ] ; int last_indexof1 = - 1 ; for ( int i = 0 ; i < n ; i ++ ) { if ( s [ i ] == '1' ) { arr [ i ] = i ; last_indexof1 = i ; } else { arr [ i ] = last_indexof1 ; } } long no_of_substr = 0 ; for ( r = n - 1 ; r >= 0 ; r -- ) { l = r ; while ( l >= 0 && ( r - l + 1 ) <= 64 && ( int ) ( Convert . ToInt32 ( s . Substring ( l , r + 1 - l ) , 2 ) ) < k ) { l -- ; } if ( r - l + 1 <= 64 ) no_of_substr += l + 1 ; else { no_of_substr += arr [ l + 1 ] + 1 ; } } return no_of_substr ; } public static void Main ( String [ ] args ) { String s = "11100" ; int k = 3 ; Console . WriteLine ( countSubstr ( s , k ) ) ; } }

Index/key variables: i, n
Accumulator variables: i, l, no_of_substr, r
Iterator variables: i, r
Class/struct names: GFG
C# program:
using System ; class GFG { static bool isPerfectCubeString ( String str ) { int sum = 0 ; for ( int i = 0 ; i < str . Length ; i ++ ) sum += ( int ) str [ i ] ; double cr = Math . Round ( Math . Pow ( sum , ( double ) 1 / 3 ) ) ; return ( cr * cr * cr == sum ) ; } public static void Main ( String [ ] args ) { String str = " ll " ; if ( isPerfectCubeString ( str ) ) Console . Write ( " Yes " ) ; else Console . Write ( " No " ) ; } }

Index/key variables: i
Accumulator variables: i, sum
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int XorAscii ( String str , int len ) { int ans = ( str [ 0 ] ) ; for ( int i = 1 ; i < len ; i ++ ) { ans = ( ans ^ ( ( str [ i ] ) ) ) ; } return ans ; } public static void Main ( String [ ] args ) { String str = " geeksforgeeks " ; int len = str . Length ; Console . Write ( XorAscii ( str , len ) + " STRNEWLINE " ) ; str = " GfG " ; len = str . Length ; Console . Write ( XorAscii ( str , len ) ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static void CamelCase ( List < String > words , String pattern ) { Dictionary < String , List < String > > map = new Dictionary < String , List < String > > ( ) ; for ( int i = 0 ; i < words . Count ; i ++ ) { String str = " " ; int l = words [ i ] . Length ; for ( int j = 0 ; j < l ; j ++ ) { if ( words [ i ] [ j ] >= ' A ' && words [ i ] [ j ] <= ' Z ' ) { str += words [ i ] [ j ] ; if ( map . ContainsKey ( str ) ) map [ str ] = list ( map [ str ] , words [ i ] ) ; else map . Add ( str , list ( null , words [ i ] ) ) ; } } } bool wordFound = false ; foreach ( KeyValuePair < String , List < String > > it in map ) { if ( it . Key . Equals ( pattern ) ) { wordFound = true ; foreach ( String s in it . Value ) Console . Write ( s + " STRNEWLINE " ) ; } } if ( ! wordFound ) { Console . Write ( " No ▁ match ▁ found " ) ; } } private static List < String > list ( List < String > list , String str ) { List < String > temp = new List < String > ( ) ; if ( list != null ) temp . AddRange ( list ) ; temp . Add ( str ) ; return temp ; } public static void Main ( String [ ] args ) { String [ ] arr = { " Hi " , " Hello " , " HelloWorld " , " HiTech " , " HiGeek " , " HiTechWorld " , " HiTechCity " , " HiTechLab " } ; List < String > words = new List < String > ( arr ) ; String pattern = " HT " ; CamelCase ( words , pattern ) ; } }

Index/key variables: i, j, str
Accumulator variables: i, j, str
Iterator variables: i, it, j, s
Boolean variables: wordFound
Class/struct names: GFG
C# program:
using System ; class GFG { static String encryption ( char [ ] s ) { int l = s . Length ; int b = ( int ) Math . Ceiling ( Math . Sqrt ( l ) ) ; int a = ( int ) Math . Floor ( Math . Sqrt ( l ) ) ; String encrypted = " " ; if ( b * a < l ) { if ( Math . Min ( b , a ) == b ) { b = b + 1 ; } else { a = a + 1 ; } } char [ , ] arr = new char [ a , b ] ; int k = 0 ; for ( int j = 0 ; j < a ; j ++ ) { for ( int i = 0 ; i < b ; i ++ ) { if ( k < l ) { arr [ j , i ] = s [ k ] ; } k ++ ; } } for ( int j = 0 ; j < b ; j ++ ) { for ( int i = 0 ; i < a ; i ++ ) { encrypted = encrypted + arr [ i , j ] ; } } return encrypted ; } static String decryption ( char [ ] s ) { int l = s . Length ; int b = ( int ) Math . Ceiling ( Math . Sqrt ( l ) ) ; int a = ( int ) Math . Floor ( Math . Sqrt ( l ) ) ; String decrypted = " " ; char [ , ] arr = new char [ a , b ] ; int k = 0 ; for ( int j = 0 ; j < b ; j ++ ) { for ( int i = 0 ; i < a ; i ++ ) { if ( k < l ) { arr [ j , i ] = s [ k ] ; } k ++ ; } } for ( int j = 0 ; j < a ; j ++ ) { for ( int i = 0 ; i < b ; i ++ ) { decrypted = decrypted + arr [ i , j ] ; } } return decrypted ; } public static void Main ( String [ ] args ) { String s = " Geeks ▁ For ▁ Geeks " ; String encrypted ; String decrypted ; encrypted = encryption ( s . ToCharArray ( ) ) ; Console . Write ( encrypted + " STRNEWLINE " ) ; decrypted = decryption ( encrypted . ToCharArray ( ) ) ; Console . Write ( decrypted ) ; } }

Index/key variables: k
Accumulator variables: i, j, k
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int checkIfStartsWithCapital ( string str ) { if ( str [ 0 ] >= ' A ' && str [ 0 ] <= ' Z ' ) return 1 ; else return 0 ; } static void check ( string str ) { if ( checkIfStartsWithCapital ( str ) == 1 ) Console . WriteLine ( " Accepted " ) ; else Console . WriteLine ( " Not ▁ Accepted " ) ; } public static void Main ( ) { string str = " GeeksforGeeks " ; check ( str ) ; str = " geeksforgeeks " ; check ( str ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int checkIfAllVowels ( String str ) { int [ ] hash = new int [ 5 ] ; for ( int i = 0 ; i < str . Length ; i ++ ) { if ( str [ i ] == ' A ' str [ i ] == ' a ' ) hash [ 0 ] = 1 ; else if ( str [ i ] == ' E ' str [ i ] == ' e ' ) hash [ 1 ] = 1 ; else if ( str [ i ] == ' I ' str [ i ] == ' i ' ) hash [ 2 ] = 1 ; else if ( str [ i ] == ' O ' str [ i ] == ' o ' ) hash [ 3 ] = 1 ; else if ( str [ i ] == ' U ' str [ i ] == ' u ' ) hash [ 4 ] = 1 ; } for ( int i = 0 ; i < 5 ; i ++ ) { if ( hash [ i ] == 0 ) { return 1 ; } } return 0 ; } static void checkIfAllVowelsArePresent ( String str ) { if ( checkIfAllVowels ( str ) == 1 ) Console . Write ( " Not ▁ Accepted STRNEWLINE " ) ; else Console . Write ( " Accepted STRNEWLINE " ) ; } public static void Main ( String [ ] args ) { String str = " aeioubc " ; checkIfAllVowelsArePresent ( str ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; using System . Collections ; class GFG { public static int smallest ( string s ) { int [ ] a = new int [ s . Length ] ; for ( int i = 0 ; i < s . Length ; i ++ ) a [ i ] = ( int ) ( s [ i ] - '0' ) ; ArrayList b = new ArrayList ( ) ; for ( int i = 0 ; i < a . Length ; i ++ ) { if ( a [ i ] % 2 != 0 ) b . Add ( a [ i ] ) ; } b . Sort ( ) ; if ( b . Count > 1 ) return ( ( int ) b [ 0 ] * 10 + ( int ) b [ 1 ] ) ; return - 1 ; } public static void Main ( string [ ] args ) { Console . Write ( smallest ( "15470" ) ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void converthenumber ( int n ) { String s = n . ToString ( ) ; String res = " " ; for ( int i = 0 ; i < s . Length ; i ++ ) { if ( s [ i ] == '1' s [ i ] == '3' s [ i ] == '5' s [ i ] == '7' s [ i ] == '9' ) res += s [ i ] ; if ( res . Length == 2 ) break ; } if ( res . Length == 2 ) Console . WriteLine ( res ) ; else Console . WriteLine ( - 1 ) ; } public static void Main ( String [ ] args ) { int n = 18720 ; converthenumber ( n ) ; } }

Index/key variables: i
Accumulator variables: i, res
Iterator variables: i
Class/struct names: GFG