dhyuti-n/xlcost-variable-roles huggingface dataset:
Java program:
class GFG { static void SieveOfEratosthenes ( int n ) { boolean [ ] prime = new boolean [ n + 1 ] ; for ( int i = 0 ; i < prime . length ; i ++ ) prime [ i ] = true ; for ( int p = 2 ; p * p <= n ; p ++ ) { if ( prime [ p ] == true ) { for ( int i = p * 2 ; i <= n ; i += p ) prime [ i ] = false ; } } boolean flag = true ; for ( int p = 2 ; p <= n ; p ++ ) { if ( prime [ p ] ) { if ( flag ) { System . out . print ( p + " ▁ " ) ; flag = false ; } else { flag = true ; } } } } public static void main ( String [ ] args ) { int n = 15 ; System . out . println ( " Following ▁ are ▁ the ▁ alternate " + " ▁ prime ▁ numbers ▁ smaller ▁ " + " than ▁ or ▁ equal ▁ to ▁ " + n ) ; SieveOfEratosthenes ( n ) ; } }

Index/key variables: i, p
Accumulator variables: i, p
Iterator variables: i, p
Boolean variables: flag
Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static boolean findGreater ( int x , int y ) { if ( x > y ) { return false ; } else { return true ; } } public static void main ( String [ ] args ) { int x = 4 ; int y = 9 ; if ( findGreater ( x , y ) ) System . out . println ( "1" ) ; else System . out . println ( "2" ) ; } }

Class/struct names: GFG
Java program:
import java . util . * ; class solution { static int max_profit ( int a [ ] , int b [ ] , int n , int fee ) { int i , j , profit ; int l , r , diff_day = 1 , sum = 0 ; b [ 0 ] = 0 ; b [ 1 ] = diff_day ; for ( i = 1 ; i < n ; i ++ ) { l = 0 ; r = diff_day ; sum = 0 ; for ( j = n - 1 ; j >= i ; j -- ) { profit = ( a [ r ] - a [ l ] ) - fee ; if ( profit > 0 ) { sum = sum + profit ; } l ++ ; r ++ ; } if ( b [ 0 ] < sum ) { b [ 0 ] = sum ; b [ 1 ] = diff_day ; } diff_day ++ ; } return 0 ; } public static void main ( String args [ ] ) { int arr [ ] = { 6 , 1 , 7 , 2 , 8 , 4 } ; int n = arr . length ; int [ ] b = new int [ 2 ] ; int tranFee = 2 ; max_profit ( arr , b , n , tranFee ) ; System . out . println ( b [ 0 ] + " , ▁ " + b [ 1 ] ) ; } }

Index/key variables: l, r
Accumulator variables: diff_day, i, j, l, r
Iterator variables: i, j
Class/struct names: solution
Java program:
class Geeks { static int binomialCoeff ( int x , int n , int k ) { int sum = 0 , term = 1 ; for ( int i = 1 ; i <= n && sum < k ; ++ i ) { term *= x - i + 1 ; term /= i ; sum += term ; } return sum ; } static int minTrials ( int n , int k ) { int low = 1 , high = k ; while ( low < high ) { int mid = ( low + high ) / 2 ; if ( binomialCoeff ( mid , n , k ) < k ) low = mid + 1 ; else high = mid ; } return low ; } public static void main ( String args [ ] ) { System . out . println ( minTrials ( 2 , 10 ) ) ; } }

Accumulator variables: sum, term
Iterator variables: i
Class/struct names: Geeks
Java program:
import java . lang . * ; class Geeks { static boolean isPrime ( int num ) { if ( num < 2 num % 2 == 0 ) return num == 2 ; for ( int i = 3 ; i * i <= num ; i += 2 ) if ( num % i == 0 ) return false ; return true ; } static int primePalindrome ( int N ) { if ( 8 <= N && N <= 11 ) return 11 ; for ( int x = 1 ; x < 100000 ; ++ x ) { String s = Integer . toString ( x ) ; StringBuffer buffer = new StringBuffer ( s ) ; buffer . reverse ( ) ; int y = Integer . parseInt ( s + buffer . substring ( 1 ) . toString ( ) ) ; if ( y >= N && isPrime ( y ) == true ) return y ; } return - 1 ; } public static void main ( String args [ ] ) { System . out . print ( primePalindrome ( 112 ) ) ; } }

Accumulator variables: i
Iterator variables: i, x
Class/struct names: Geeks
Java program:
import java . util . Vector ; class GFG { static int getsum ( int a ) { int r = 0 , sum = 0 ; while ( a > 0 ) { r = a % 10 ; sum = sum + r ; a = a / 10 ; } return sum ; } static void value ( int a , int b , int c ) { int co = 0 , p = 0 ; int no , r = 0 , x = 0 , q = 0 , w = 0 ; Vector < Integer > v = new Vector < Integer > ( ) ; for ( int i = 1 ; i < 82 ; i ++ ) { no = ( int ) Math . pow ( i , a ) ; no = b * no + c ; if ( no > 0 && no < 1000000000 ) { x = getsum ( no ) ; if ( x == i ) { q ++ ; v . add ( no ) ; w ++ ; } } } for ( int i = 0 ; i < v . size ( ) ; i ++ ) { System . out . print ( v . get ( i ) + " ▁ " ) ; } } public static void main ( String [ ] args ) { int a = 2 , b = 2 , c = - 1 ; value ( a , b , c ) ; } }

Accumulator variables: i, q, w
Iterator variables: i
Class/struct names: GFG
Java program:
class GFG { static void print ( int p0 ) { int p1 , i = 0 , x , flag , k ; while ( true ) { flag = 1 ; x = ( int ) ( Math . pow ( 2 , i ) ) ; p1 = x * p0 - ( x - 1 ) ; for ( k = 2 ; k < p1 ; k ++ ) { if ( p1 % k == 0 ) { flag = 0 ; break ; } } if ( flag == 0 ) break ; System . out . print ( p1 + " ▁ " ) ; i ++ ; } } public static void main ( String [ ] args ) { int p0 = 19 ; print ( p0 ) ; } }

Accumulator variables: i, k
Iterator variables: k
Class/struct names: GFG
Java program:
class solution_1 { static int findOddPair ( int A [ ] , int N ) { int count = 0 ; for ( int i = 0 ; i < N ; i ++ ) if ( ( A [ i ] % 2 == 1 ) ) count ++ ; return count * ( count - 1 ) / 2 ; } public static void main ( String args [ ] ) { int a [ ] = { 5 , 1 , 3 , 2 } ; int n = a . length ; System . out . println ( findOddPair ( a , n ) ) ; } }

Index/key variables: i
Accumulator variables: count, i
Iterator variables: i
Class/struct names: solution_1
Java program:
class GFG { static boolean isSurd ( int n ) { for ( int i = 2 ; i * i <= n ; i ++ ) { int j = i ; while ( j < n ) j = j * i ; if ( j == n ) return false ; } return true ; } public static void main ( String args [ ] ) { int n = 15 ; if ( isSurd ( n ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
Java program:
class Geeks { static long LastTwoDigit ( long num ) { long one = num % 10 ; num /= 10 ; long tens = num % 10 ; tens *= 10 ; num = tens + one ; return num ; } public static void main ( String args [ ] ) { int n = 10 ; long num = 1 ; num = ( long ) Math . pow ( 2 , n ) ; System . out . println ( " Last ▁ 2 ▁ digits ▁ of ▁ 2 ^ 10 ▁ = ▁ " + LastTwoDigit ( num ) ) ; } }

Accumulator variables: num, tens
Class/struct names: Geeks
Java program:
class GFG { static int power ( long x , long y , long p ) { while ( y > 0 ) { long r = y & 1 ; if ( r == 1 ) res = ( res * ( int ) x ) % ( int ) p ; x = ( x * x ) % p ; } return res ; } static int numberOfDigits ( int x ) { int i = 0 ; while ( x != 0 ) { x /= 10 ; i ++ ; } return i ; } static void LastTwoDigit ( int n ) { System . out . print ( " Last ▁ " + 2 + " ▁ digits ▁ of ▁ " + 2 + " ^ " ) ; System . out . print ( n + " ▁ = ▁ " ) ; int temp = 1 ; for ( int i = 1 ; i <= 2 ; i ++ ) temp *= 10 ; temp = power ( 2 , n , temp ) ; for ( int i = 0 ; i < ( 2 - numberOfDigits ( temp ) ) ; i ++ ) System . out . print ( 0 + " ▁ " ) ; if ( temp != 0 ) System . out . println ( temp ) ; } public static void main ( String [ ] args ) { int n = 72 ; LastTwoDigit ( n ) ; } }

Accumulator variables: i, temp, x
Iterator variables: i
Class/struct names: GFG
Java program:
class GFG { static long modPower ( long x , long y , long p ) { while ( y > 0 ) { if ( ( y & 1 ) > 0 ) res = ( res * x ) % p ; x = ( x * x ) % p ; } return res ; } static long gcd ( long a , long b ) { if ( b == 0 ) return a ; return gcd ( b , a % b ) ; } static long gcdPow ( long a , long n , long c ) { if ( a % c == 0 ) return c ; long modexpo = modPower ( a , n , c ) ; return gcd ( modexpo , c ) ; } public static void main ( String [ ] args ) { long a = 10248585 , n = 1000000 , c = 12564 ; System . out . println ( gcdPow ( a , n , c ) ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static int countOddSum ( int ar [ ] , int n ) { int result = 0 ; for ( int i = 0 ; i <= n - 1 ; i ++ ) { int val = 0 ; for ( int j = i ; j <= n - 1 ; j ++ ) { val = val + ar [ j ] ; if ( val % 2 != 0 ) result ++ ; } } return ( result ) ; } public static void main ( String [ ] args ) { int ar [ ] = { 5 , 4 , 4 , 5 , 1 , 3 } ; int n = ar . length ; System . out . print ( " The ▁ Number ▁ of ▁ Subarrays " + " ▁ with ▁ odd ▁ sum ▁ is ▁ " ) ; System . out . println ( countOddSum ( ar , n ) ) ; } }

Index/key variables: j
Accumulator variables: i, j, result
Iterator variables: i, j
Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static int countOddSum ( int ar [ ] , int n ) { int temp [ ] = { 1 , 0 } ; int result = 0 , val = 0 ; for ( int i = 0 ; i <= n - 1 ; i ++ ) { val = ( ( val + ar [ i ] ) % 2 + 2 ) % 2 ; temp [ val ] ++ ; } result = temp [ 0 ] * temp [ 1 ] ; return ( result ) ; } public static void main ( String [ ] args ) { int ar [ ] = { 5 , 4 , 4 , 5 , 1 , 3 } ; int n = ar . length ; System . out . println ( " The ▁ Number ▁ of ▁ Subarrays " + " ▁ with ▁ odd ▁ sum ▁ is ▁ " + countOddSum ( ar , n ) ) ; } }

Index/key variables: i, val
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
Java program:
public class GEE { static void printPFsInPairs ( int n ) { for ( int i = 1 ; i * i <= n ; i ++ ) if ( n % i == 0 ) System . out . println ( i + " * " + n / i ) ; } public static void main ( String [ ] args ) { int n = 24 ; printPFsInPairs ( n ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GEE
Java program:
import java . io . * ; public class GFG { static int rangesum ( int n , int l , int r ) { int [ ] arr = new int [ n ] ; int c = 1 , i = 0 ; while ( c <= n ) { arr [ i ++ ] = c ; c += 2 ; } c = 2 ; while ( c <= n ) { arr [ i ++ ] = c ; c += 2 ; } int sum = 0 ; for ( i = l - 1 ; i < r ; i ++ ) { sum += arr [ i ] ; } return sum ; } public static void main ( String [ ] args ) { int n = 12 ; int l = 1 , r = 11 ; System . out . println ( rangesum ( n , l , r ) ) ; } }

Index/key variables: i, n
Accumulator variables: c, i, sum
Iterator variables: i
Class/struct names: GFG
Java program:
import java . io . * ; public class GFG { static int sumeven ( int n , int l , int r ) { int sum = 0 ; int mid = n / 2 ; if ( r <= mid ) { int first = ( 2 * l - 1 ) ; int last = ( 2 * r - 1 ) ; int no_of_terms = r - l + 1 ; sum = ( ( no_of_terms ) * ( ( first + last ) ) ) / 2 ; } else if ( l >= mid ) { int first = ( 2 * ( l - n / 2 ) ) ; int last = ( 2 * ( r - n / 2 ) ) ; int no_of_terms = r - l + 1 ; sum = ( ( no_of_terms ) * ( ( first + last ) ) ) / 2 ; } else { int sumleft = 0 , sumright = 0 ; int first_term1 = ( 2 * l - 1 ) ; int last_term1 = ( 2 * ( n / 2 ) - 1 ) ; int no_of_terms1 = n / 2 - l + 1 ; sumleft = ( ( no_of_terms1 ) * ( ( first_term1 + last_term1 ) ) ) / 2 ; int first_term2 = 2 ; int last_term2 = ( 2 * ( r - n / 2 ) ) ; int no_of_terms2 = r - mid ; sumright = ( ( no_of_terms2 ) * ( ( first_term2 + last_term2 ) ) ) / 2 ; sum = ( sumleft + sumright ) ; } return sum ; } static int sumodd ( int n , int l , int r ) { int mid = n / 2 + 1 ; int sum = 0 ; if ( r <= mid ) { int first = ( 2 * l - 1 ) ; int last = ( 2 * r - 1 ) ; int no_of_terms = r - l + 1 ; sum = ( ( no_of_terms ) * ( ( first + last ) ) ) / 2 ; } else if ( l > mid ) { int first = ( 2 * ( l - mid ) ) ; int last = ( 2 * ( r - mid ) ) ; int no_of_terms = r - l + 1 ; sum = ( ( no_of_terms ) * ( ( first + last ) ) ) / 2 ; } else { int sumleft = 0 , sumright = 0 ; int first_term1 = ( 2 * l - 1 ) ; int last_term1 = ( 2 * mid - 1 ) ; int no_of_terms1 = mid - l + 1 ; sumleft = ( ( no_of_terms1 ) * ( ( first_term1 + last_term1 ) ) ) / 2 ; int first_term2 = 2 ; int last_term2 = ( 2 * ( r - mid ) ) ; int no_of_terms2 = r - mid ; sumright = ( ( no_of_terms2 ) * ( ( first_term2 + last_term2 ) ) ) / 2 ; sum = ( sumleft + sumright ) ; } return sum ; } static int rangesum ( int n , int l , int r ) { int sum = 0 ; if ( n % 2 == 0 ) return sumeven ( n , l , r ) ; else return sumodd ( n , l , r ) ; } public static void main ( String [ ] args ) { int n = 12 ; int l = 1 , r = 11 ; System . out . println ( rangesum ( n , l , r ) ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static void findAngle ( int n ) { int interiorAngle , exteriorAngle ; interiorAngle = ( n - 2 ) * 180 / n ; exteriorAngle = 360 / n ; System . out . println ( " Interior ▁ angle : ▁ " + interiorAngle ) ; System . out . println ( " Exterior ▁ angle : ▁ " + exteriorAngle ) ; } public static void main ( String [ ] args ) { int n = 10 ; findAngle ( n ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; import java . lang . Math ; class GFG { static void distance ( float x1 , float y1 , float z1 , float x2 , float y2 , float z2 ) { double d = Math . pow ( ( Math . pow ( x2 - x1 , 2 ) + Math . pow ( y2 - y1 , 2 ) + Math . pow ( z2 - z1 , 2 ) * 1.0 ) , 0.5 ) ; System . out . println ( " Distance ▁ is ▁ " + d ) ; return ; } public static void main ( String [ ] args ) { float x1 = 2 ; float y1 = - 5 ; float z1 = 7 ; float x2 = 3 ; float y2 = 4 ; float z2 = 5 ; distance ( x1 , y1 , z1 , x2 , y2 , z2 ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static boolean DivisibleBy41 ( int first , int second , int c , int n ) { int digit [ ] = new int [ n ] ; digit [ 0 ] = first ; digit [ 1 ] = second ; for ( int i = 2 ; i < n ; i ++ ) digit [ i ] = ( digit [ i - 1 ] * c + digit [ i - 2 ] ) % 10 ; int ans = digit [ 0 ] ; for ( int i = 1 ; i < n ; i ++ ) ans = ( ans * 10 + digit [ i ] ) % 41 ; if ( ans % 41 == 0 ) return true ; else return false ; } public static void main ( String [ ] args ) { int first = 1 , second = 2 , c = 1 , n = 3 ; if ( DivisibleBy41 ( first , second , c , n ) ) System . out . println ( " YES " ) ; else System . out . println ( " NO " ) ; } }

Index/key variables: i, n
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static int findTetrahedralNumber ( int n ) { return ( ( n * ( n + 1 ) * ( n + 2 ) ) / 6 ) ; } static void printSeries ( int n ) { int prev = 0 ; int curr ; for ( int i = 1 ; i <= n ; i ++ ) { curr = findTetrahedralNumber ( i ) ; curr = curr + prev ; System . out . print ( curr + " ▁ " ) ; prev = curr ; } } public static void main ( String [ ] args ) { int n = 10 ; printSeries ( n ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static void printSeries ( int n ) { for ( int i = 1 ; i <= n ; i ++ ) { int num = ( i * ( i + 1 ) * ( i + 2 ) * ( i + 3 ) / 24 ) ; System . out . print ( num + " ▁ " ) ; } } public static void main ( String [ ] args ) { int n = 10 ; printSeries ( n ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static int No_Of_Pairs ( int N ) { int i = 1 ; while ( ( i * i * i ) + ( 2 * i * i ) + i <= N ) i ++ ; return ( i - 1 ) ; } static void print_pairs ( int pairs ) { int i = 1 , mul ; for ( i = 1 ; i <= pairs ; i ++ ) { mul = i * ( i + 1 ) ; System . out . println ( " Pair ▁ no . ▁ " + i + " ▁ - - > ▁ ( " + ( mul * i ) + " , ▁ " + mul * ( i + 1 ) + " ) " ) ; } } public static void main ( String [ ] args ) { int N = 500 , pairs , mul , i = 1 ; pairs = No_Of_Pairs ( N ) ; System . out . println ( " No . ▁ of ▁ pairs ▁ = ▁ " + pairs ) ; print_pairs ( pairs ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static long findTriangularNumber ( int n ) { return ( n * ( n + 1 ) ) / 2 ; } static void printSeries ( int n ) { long prev = 0 ; long curr ; for ( int i = 1 ; i <= n ; i ++ ) { curr = findTriangularNumber ( i ) ; curr = curr + prev ; System . out . print ( curr + " ▁ " ) ; prev = curr ; } } public static void main ( String [ ] args ) { int n = 10 ; printSeries ( n ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static void printSeries ( int n ) { for ( int i = 1 ; i <= n ; i ++ ) { int num = i * ( i + 1 ) * ( i + 2 ) / 6 ; System . out . print ( num + " ▁ " ) ; } } public static void main ( String [ ] args ) { int n = 10 ; printSeries ( n ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static void count_even_odd ( int min , int max , int steps [ ] [ ] ) { int a , b , even , odd ; boolean beven = true , aeven = false ; int n = 2 ; for ( int i = 0 ; i < n ; i ++ ) { a = steps [ i ] [ 0 ] ; b = steps [ i ] [ 1 ] ; if ( ! ( aeven || ( a & 1 ) > 0 ) ) aeven = true ; if ( beven ) { if ( ( b & 1 ) > 0 ) beven = false ; } else if ( ! ( ( a & 1 ) > 0 ) ) { if ( ! ( ( b & 1 ) > 0 ) ) beven = true ; } else { if ( ( b & 1 ) > 0 ) beven = true ; } } if ( beven ) { even = ( int ) max / 2 - ( int ) ( min - 1 ) / 2 ; odd = 0 ; } else { even = ( int ) max / 2 - ( int ) ( min - 1 ) / 2 ; odd = 0 ; } if ( ! ( beven ^ aeven ) ) even += max - min + 1 - ( int ) max / 2 + ( int ) ( min - 1 ) / 2 ; else odd += max - min + 1 - ( int ) max / 2 + ( int ) ( min - 1 ) / 2 ; System . out . print ( " even ▁ = ▁ " + even + " , ▁ odd ▁ = ▁ " + odd ) ; } public static void main ( String [ ] args ) { int min = 1 , max = 4 ; int steps [ ] [ ] = { { 1 , 2 } , { 3 , 4 } } ; count_even_odd ( min , max , steps ) ; } }

Index/key variables: i
Accumulator variables: even, i, odd
Iterator variables: i
Boolean variables: aeven, beven
Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static int getMaxOnes ( int n , int x ) { int zeroes = ( n / x ) ; zeroes = zeroes * zeroes ; int total = n * n ; int ans = total - zeroes ; return ans ; } public static void main ( String [ ] args ) { int n = 5 ; int x = 2 ; System . out . println ( getMaxOnes ( n , x ) ) ; } }

Class/struct names: GFG
Java program:
import java . util . * ; class geeks { public static int minimumOperations ( int [ ] a , int n ) { HashMap < Integer , Integer > mp = new HashMap < > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( mp . get ( a [ i ] ) != null ) { int x = mp . get ( a [ i ] ) ; mp . put ( a [ i ] , ++ x ) ; } else mp . put ( a [ i ] , 1 ) ; } int count = 0 ; for ( HashMap . Entry < Integer , Integer > entry : mp . entrySet ( ) ) { if ( entry . getValue ( ) > 1 ) { count += ( entry . getValue ( ) - 1 ) ; } } return count ; } public static void main ( String [ ] args ) { int [ ] a = { 2 , 1 , 2 , 3 , 3 , 4 , 3 } ; int n = a . length ; System . out . println ( minimumOperations ( a , n ) ) ; } }

Index/key variables: i
Accumulator variables: count, i
Iterator variables: i
Class/struct names: geeks
Java program:
import java . io . * ; class GFG { static void check ( int n , int m ) { if ( n == 2 m == 2 n % m == 0 ) { System . out . println ( " Yes " ) ; } else { System . out . println ( " No " ) ; } } public static void main ( String [ ] args ) { int m = 3 , n = 9 ; check ( n , m ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static void findSurfaceArea ( float a , float h ) { float Area ; Area = 6 * a * h + 3 * ( float ) ( Math . sqrt ( 3 ) ) * a * a ; System . out . println ( " Surface ▁ Area : ▁ " + Area ) ; } static void findVolume ( float a , float h ) { float Volume ; Volume = 3 * ( float ) ( Math . sqrt ( 3 ) ) * a * a * h / 2 ; System . out . println ( " Volume : ▁ " + Volume ) ; } public static void main ( String [ ] args ) { float a = 5 , h = 10 ; findSurfaceArea ( a , h ) ; findVolume ( a , h ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; import java . util . * ; import java . lang . * ; class GFG { static double MinimumMail ( int n , int k , int x ) { double m = ( n - 1 ) + Math . ceil ( ( n - 1 ) * 1.0 / x ) * ( n - 1 ) + Math . ceil ( n * 1.0 / x ) * ( k - n ) ; return m ; } public static void main ( String [ ] args ) { int N = 4 ; int K = 9 ; int X = 2 ; System . out . print ( ( int ) MinimumMail ( N , K , X ) + "NEW_LINE"); } }

Class/struct names: GFG
Java program:
class GFG { static void findArea ( float a , float b ) { float Area ; Area = ( float ) 3.142 * a * b ; System . out . println ( " Area : ▁ " + Area ) ; } public static void main ( String [ ] args ) { float a = 5 , b = 4 ; findArea ( a , b ) ; } }

Class/struct names: GFG
Java program:
class GFG { static int calculate ( int x , int k , int m ) { int result = x ; k -- ; while ( k -- > 0 ) { result = ( int ) Math . pow ( result , x ) ; if ( result > m ) result %= m ; } return result ; } public static void main ( String args [ ] ) { int x = 5 , k = 2 , m = 3 ; System . out . println ( calculate ( x , k , m ) ) ; } }

Accumulator variables: k
Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static int rev ( int n , int temp ) { if ( n == 0 ) return temp ; temp = ( temp * 10 ) + ( n % 10 ) ; return rev ( n / 10 , temp ) ; } public static void main ( String [ ] args ) { int n = 121 ; int temp = rev ( n , 0 ) ; if ( temp == n ) System . out . println ( " yes " ) ; else System . out . println ( " no " ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static void findGreater ( int a , int b , int n ) { if ( ! ( ( n & 1 ) > 0 ) ) { a = Math . abs ( a ) ; b = Math . abs ( b ) ; } if ( a == b ) System . out . println ( " a ^ n ▁ is ▁ " + " equal ▁ to ▁ b ^ n " ) ; else if ( a > b ) System . out . println ( " a ^ n ▁ is ▁ greater ▁ " + " than ▁ b ^ n " ) ; else System . out . println ( " b ^ n ▁ is ▁ greater ▁ " + " than ▁ a ^ n " ) ; } public static void main ( String [ ] args ) { int a = 12 , b = 24 , n = 5 ; findGreater ( a , b , n ) ; } }

Class/struct names: GFG
Java program:
class GFG { static void fibonacci ( double n ) { double fib ; for ( double i = 0 ; i < n ; i ++ ) { fib = ( Math . pow ( ( 1 + Math . sqrt ( 5 ) ) , i ) - Math . pow ( ( 1 - Math . sqrt ( 5 ) ) , i ) ) / ( Math . pow ( 2 , i ) * Math . sqrt ( 5 ) ) ; System . out . print ( ( int ) fib + " ▁ " ) ; } } public static void main ( String [ ] args ) { double n = 8 ; fibonacci ( n ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static int center_hexadecagonal_num ( int n ) { return 8 * n * n - 8 * n + 1 ; } public static void main ( String args [ ] ) { int n = 2 ; System . out . print ( n + " th ▁ centered ▁ " + " hexadecagonal ▁ number : ▁ " ) ; System . out . println ( center_hexadecagonal_num ( n ) ) ; n = 12 ; System . out . print ( n + " th ▁ centered ▁ " + " hexadecagonal ▁ number : ▁ " ) ; System . out . println ( center_hexadecagonal_num ( n ) ) ; } }

Class/struct names: GFG
Java program:
class GFG { public static int findNature ( int a , int b , int n ) { int [ ] seq = new int [ 100 ] ; seq [ 0 ] = a ; seq [ 1 ] = b ; for ( int i = 2 ; i <= n ; i ++ ) seq [ i ] = seq [ i - 1 ] + seq [ i - 2 ] ; if ( ( seq [ n ] & 1 ) != 0 ) return 1 ; else return 0 ; } public static void main ( String [ ] args ) { int a = 2 , b = 4 ; int n = 3 ; if ( findNature ( a , b , n ) == 1 ) System . out . println ( " Odd ▁ " ) ; else System . out . println ( " Even ▁ " ) ; } }

Index/key variables: i, n
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static void check ( long m , long n ) { double RHS = m * ( double ) Math . log ( n ) ; double LHS = n * ( double ) Math . log ( m ) ; if ( LHS > RHS ) System . out . print ( " m ^ n ▁ > ▁ n ^ m " ) ; else if ( LHS < RHS ) System . out . print ( " m ^ n ▁ < ▁ n ^ m " ) ; else System . out . print ( " m ^ n ▁ = ▁ n ^ m " ) ; } static public void main ( String [ ] args ) { long m = 987654321 , n = 123456987 ; check ( m , n ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static void printMatrix ( int n ) { float H [ ] [ ] = new float [ n ] [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { H [ i ] [ j ] = ( float ) 1.0 / ( ( i + 1 ) + ( j + 1 ) - ( float ) 1.0 ) ; } } for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) System . out . print ( H [ i ] [ j ] + " ▁ " ) ; System . out . println ( ) ; } } public static void main ( String [ ] args ) { int n = 3 ; printMatrix ( n ) ; } }

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