dhyuti-n/xlcost-variable-roles huggingface dataset:
C# program:
using System ; class GFG { static int previousFibonacci ( int n ) { double a = n / ( ( 1 + ( int ) Math . Sqrt ( 5 ) ) / 2.0 ) ; return ( int ) Math . Round ( a ) ; } static int nextFibonacci ( int n ) { double a = n * ( 1 + Math . Sqrt ( 5 ) ) / 2.0 ; return ( int ) Math . Round ( a ) ; } static bool isPerfectSquare ( int x ) { int s = ( int ) Math . Sqrt ( x ) ; return ( s * s == x ) ; } static bool isFibonacci ( int n ) { return ( isPerfectSquare ( 5 * n * n + 4 ) || isPerfectSquare ( 5 * n * n - 4 ) ) ; } static int countFibonacciPairs ( int [ ] arr , int n ) { int res = 0 ; for ( int i = 0 ; i < n ; i ++ ) for ( int j = i + 1 ; j < n ; j ++ ) if ( isFibonacci ( arr [ i ] ) && isFibonacci ( arr [ j ] ) ) { int prevFib = previousFibonacci ( arr [ i ] ) ; int nextFib = nextFibonacci ( arr [ i ] ) ; if ( prevFib == arr [ j ] nextFib == arr [ j ] ) { res ++ ; } } return res ; } public static void Main ( String [ ] args ) { int [ ] a = { 3 , 5 , 8 , 11 } ; int n = a . Length ; Console . Write ( countFibonacciPairs ( a , n ) ) ; } }

Index/key variables: i, j
Accumulator variables: i, j, res
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int countPairsWithProdK ( int [ ] arr , int n , int k ) { int count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = i + 1 ; j < n ; j ++ ) if ( arr [ i ] * arr [ j ] == k ) count ++ ; } return count ; } public static void Main ( string [ ] args ) { int [ ] arr = { 1 , 5 , 3 , 4 , 2 } ; int N = arr . Length ; int K = 3 ; Console . WriteLine ( countPairsWithProdK ( arr , N , K ) ) ; } }

Index/key variables: i, j
Accumulator variables: count, i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int MAX = 100000 ; static int countPairsWithProductK ( int [ ] arr , int n , int k ) { int count = 0 ; int i ; bool [ ] hashmap = new bool [ MAX ] ; for ( i = 0 ; i < n ; i ++ ) hashmap [ arr [ i ] ] = true ; for ( i = 0 ; i < n ; i ++ ) { int x = arr [ i ] ; double index = 1.0 * k / arr [ i ] ; if ( index >= 0 && ( ( index - ( int ) ( index ) ) == 0 ) && hashmap [ k / x ] ) count ++ ; hashmap [ x ] = false ; } return count ; } public static void Main ( String [ ] args ) { int [ ] arr = { 1 , 5 , 3 , 4 , 2 } ; int N = arr . Length ; int K = 3 ; Console . Write ( countPairsWithProductK ( arr , N , K ) ) ; } }

Index/key variables: MAX, i, x
Accumulator variables: count, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void oddints ( int n , int k ) { if ( n % 2 != k % 2 ) { Console . WriteLine ( " - 1" ) ; return ; } int sum = 0 ; int i = 1 ; int j = 1 ; while ( j < k ) { sum = sum + i ; Console . Write ( i + " ▁ " ) ; i = i + 2 ; j ++ ; } int finalOdd = n - sum ; Console . WriteLine ( finalOdd ) ; } public static void Main ( String [ ] args ) { int n = 10 ; int k = 2 ; oddints ( n , k ) ; } }

Accumulator variables: j
Class/struct names: GFG
C# program:
using System ; public class GFG { static int [ ] a ; static int search ( int [ ] a , int k , int x ) { int j ; for ( j = k - 1 ; j > - 1 ; j -- ) { if ( a [ j ] == x ) return j ; } return - 1 ; } static void genArray ( int [ ] arr , int N ) { for ( int i = 0 ; i < N - 1 ; i ++ ) { if ( search ( arr , i , arr [ i ] ) == - 1 ) arr [ i + 1 ] = 0 ; else arr [ i + 1 ] = ( i - search ( arr , i , arr [ i ] ) ) ; } } public static void Main ( string [ ] args ) { int N = 5 ; int size = N + 1 ; int [ ] a = new int [ N ] ; genArray ( a , N ) ; for ( int i = 0 ; i < N ; i ++ ) Console . Write ( a [ i ] + " ▁ " ) ; } }

Index/key variables: N, 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 List < int > getPerfectcubes ( int n ) { List < int > perfectcubes = new List < int > ( ) ; int current = 1 ; int i = 1 ; while ( current <= n ) { perfectcubes . Add ( current ) ; i += 1 ; current = ( int ) ( Math . Pow ( i , 3 ) ) ; } return perfectcubes ; } static int maxPairSum ( int [ ] arr ) { int n = arr . Length ; int max = 0 ; int secondMax = 0 ; if ( arr [ 0 ] > arr [ 1 ] ) { max = arr [ 0 ] ; secondMax = arr [ 1 ] ; } else { max = arr [ 1 ] ; secondMax = arr [ 0 ] ; } for ( int i = 2 ; i < n ; i ++ ) { if ( arr [ i ] > max ) { secondMax = max ; max = arr [ i ] ; } else if ( arr [ i ] > secondMax ) { secondMax = arr [ i ] ; } } return ( max + secondMax ) ; } static int countPairsWith ( int n , List < int > perfectcubes , List < int > nums ) { int count = 0 ; for ( int i = 0 ; i < perfectcubes . Count ; i ++ ) { int temp = perfectcubes [ i ] - n ; if ( temp > n && ( nums . Contains ( temp ) ) ) count += 1 ; } return count ; } static int countPairs ( int [ ] arr ) { int n = arr . Length ; int max = maxPairSum ( arr ) ; List < int > perfectcubes = getPerfectcubes ( max ) ; List < int > nums = new List < int > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { nums . Add ( arr [ i ] ) ; } int count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { count += countPairsWith ( arr [ i ] , perfectcubes , nums ) ; } return count ; } public static void Main ( String [ ] agrs ) { int [ ] arr = { 2 , 6 , 18 , 9 , 999 , 1 } ; Console . Write ( countPairs ( arr ) ) ; } }

Index/key variables: i
Accumulator variables: count, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int countCubes ( int a , int b ) { for ( int i = a ; i <= b ; i ++ ) for ( int j = 1 ; j * j * j <= i ; j ++ ) if ( j * j * j == i ) cnt ++ ; return cnt ; } public static void Main ( ) { int a = 7 , b = 30 ; Console . Write ( " Count ▁ of ▁ Cubes ▁ is ▁ " + countCubes ( a , b ) ) ; } }

Accumulator variables: cnt, i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static int countCubes ( int a , int b ) { return ( int ) ( Math . Floor ( Math . Cbrt ( b ) ) - Math . Ceiling ( Math . Cbrt ( a ) ) + 1 ) ; } public static void Main ( string [ ] args ) { int a = 7 , b = 28 ; Console . WriteLine ( " Count ▁ of ▁ cubes ▁ is ▁ " + countCubes ( a , b ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static bool isArmstrong ( int x , int n ) { int sum1 = 0 ; int temp = x ; while ( temp > 0 ) { int digit = temp % 10 ; sum1 += ( int ) Math . Pow ( digit , n ) ; temp /= 10 ; } return sum1 == x ; } static void CalculateXORandOR ( int n ) { int CalculateXOR = 0 ; int CalculateOR = 0 ; int start = ( int ) Math . Pow ( 10 , n - 1 ) ; int end = ( int ) ( Math . Pow ( 10 , n ) ) - 1 ; for ( int i = start ; i < end + 1 ; i ++ ) { if ( isArmstrong ( i , n ) ) { CalculateXOR = CalculateXOR ^ i ; CalculateOR = CalculateOR | i ; } } Console . WriteLine ( " XOR ▁ = ▁ " + CalculateXOR ) ; Console . WriteLine ( " OR ▁ = ▁ " + CalculateOR ) ; } public static void Main ( String [ ] args ) { int n = 4 ; CalculateXORandOR ( n ) ; } }

Accumulator variables: i, sum1, temp
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void perfectCube ( int N ) { int cube ; for ( int i = 0 ; i <= N ; i ++ ) { cube = i * i * i ; if ( cube == N ) { Console . WriteLine ( " Yes " ) ; return ; } else if ( cube > N ) { Console . WriteLine ( " NO " ) ; return ; } } } public static void Main ( string [ ] args ) { int N = 216 ; perfectCube ( N ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void perfectCube ( int N ) { int cube_root ; cube_root = ( int ) Math . Round ( Math . Cbrt ( N ) ) ; if ( cube_root * cube_root * cube_root == N ) { Console . WriteLine ( " Yes " ) ; return ; } else { Console . WriteLine ( " NO " ) ; return ; } } public static void Main ( string [ ] args ) { int N = 125 ; perfectCube ( N ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void check ( int [ ] arr , int N ) { int even = 0 ; int odd = 0 ; for ( int i = 0 ; i < N ; i ++ ) { if ( arr [ i ] % 2 == 1 ) { odd ++ ; } else { even ++ ; } } if ( even == N odd == N ) Console . Write ( " Yes " ) ; else Console . Write ( " No " ) ; } public static void Main ( String [ ] args ) { int [ ] arr = { 1 , 1 , 3 } ; int N = arr . Length ; check ( arr , N ) ; } }

Index/key variables: i
Accumulator variables: even, i, odd
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { public static void findSum ( int N ) { int sum = ( N ) * ( N + 1 ) / 2 ; int r = ( int ) ( Math . Log ( N ) / Math . Log ( 2 ) ) + 1 ; int expSum = ( int ) ( Math . Pow ( 2 , r ) ) - 1 ; Console . Write ( sum - expSum ) ; } public static void Main ( string [ ] args ) { int N = 2 ; findSum ( N ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void findNumbers ( int n , int b ) { double even = 0 , odd = 0 ; if ( b % 2 == 0 ) { even = Math . Pow ( b , n ) - 2 ; odd = Math . Pow ( b , n ) - 1 ; } else { even = Math . Pow ( b , n ) - 1 ; odd = Math . Pow ( b , n ) - 2 ; } Console . WriteLine ( " Even ▁ Number ▁ = ▁ " + ( int ) even ) ; Console . Write ( " Odd ▁ Number ▁ = ▁ " + ( int ) odd ) ; } public static void Main ( String [ ] args ) { int N = 2 , B = 5 ; findNumbers ( N , B ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int findMinNumber ( int n ) { int count = 0 , ans = 1 ; while ( n % 2 == 0 ) { count ++ ; n /= 2 ; } if ( count % 3 != 0 ) ans *= ( int ) Math . Pow ( 2 , ( count % 3 ) ) ; for ( int i = 3 ; i <= Math . Sqrt ( n ) ; i += 2 ) { count = 0 ; while ( n % i == 0 ) { count ++ ; n /= i ; } if ( count % 3 != 0 ) ans *= ( int ) Math . Pow ( i , ( count % 3 ) ) ; } if ( n > 2 ) ans *= n ; return ans ; } public static void Main ( String [ ] args ) { int n = 128 ; Console . Write ( findMinNumber ( n ) + " STRNEWLINE " ) ; } }

Accumulator variables: ans, count, i, n
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void isPerfectSquare ( int x ) { int sr = ( int ) Math . Sqrt ( x ) ; if ( sr * sr == x ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } public static void Main ( String [ ] args ) { int n = 7 ; int k = 2 ; isPerfectSquare ( n + k ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int countSteps ( int n ) { int steps = 0 ; while ( n > 0 ) { int largest = ( int ) Math . Pow ( n , ( double ) 1 / 3 ) ; n -= ( largest * largest * largest ) ; steps ++ ; } return steps ; } public static void Main ( String [ ] args ) { int n = 150 ; Console . Write ( countSteps ( n ) ) ; } }

Accumulator variables: n, steps
Class/struct names: GFG
C# program:
using System ; class GFG { static int product ( int N ) { int ans = 1 ; int val = ( int ) Math . Pow ( 2 , N - 1 ) ; for ( int i = 1 ; i <= N ; i ++ ) { ans *= ( int ) Math . Pow ( i , val ) ; } return ans ; } public static void Main ( string [ ] args ) { int N = 2 ; Console . WriteLine ( product ( N ) ) ; } }

Accumulator variables: ans, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void threetangcircle ( int R ) { Console . WriteLine ( " The ▁ radii ▁ of ▁ the ▁ tangent ▁ circles ▁ is ▁ " + 0.4645 * R ) ; } public static void Main ( ) { int R = 4 ; threetangcircle ( R ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int circle ( int x1 , int y1 , int x2 , int y2 , int r1 , int r2 ) { int distSq = ( x1 - x2 ) * ( x1 - x2 ) + ( y1 - y2 ) * ( y1 - y2 ) ; int radSumSq = ( r1 + r2 ) * ( r1 + r2 ) ; if ( distSq == radSumSq ) return 1 ; else if ( distSq > radSumSq ) return - 1 ; else return 0 ; } public static void Main ( String [ ] args ) { int x1 = - 10 , y1 = 8 ; int x2 = 14 , y2 = - 24 ; int r1 = 30 , r2 = 10 ; int t = circle ( x1 , y1 , x2 , y2 , r1 , r2 ) ; if ( t == 1 ) Console . WriteLine ( " There ▁ are ▁ 3 ▁ common ▁ tangents " + " ▁ between ▁ the ▁ circles . " ) ; else if ( t < 0 ) Console . WriteLine ( " There ▁ are ▁ 4 ▁ common ▁ tangents " + " ▁ between ▁ the ▁ circles . " ) ; else Console . WriteLine ( " There ▁ are ▁ 2 ▁ common ▁ tangents " + " ▁ between ▁ the ▁ circles . " ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int GCD ( int a , int b ) { return ( b != 0 ? GCD ( b , a % b ) : a ) ; } static void ratiotang ( int r1 , int r2 ) { Console . WriteLine ( " The ▁ ratio ▁ is ▁ " + r1 / GCD ( r1 , r2 ) + " : " + r2 / GCD ( r1 , r2 ) ) ; } static public void Main ( ) { int r1 = 4 , r2 = 8 ; ratiotang ( r1 , r2 ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int Regions ( int Vertices , int Edges ) { int R = Edges + 2 - Vertices ; return R ; } static public void Main ( ) { int V = 5 , E = 7 ; Console . WriteLine ( Regions ( V , E ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int GCD ( int a , int b ) { return ( b != 0 ? GCD ( b , a % b ) : a ) ; } static void ratiotang ( int r1 , int r2 ) { Console . WriteLine ( " The ▁ ratio ▁ is ▁ " + r1 / GCD ( r1 , r2 ) + " ▁ : ▁ " + r2 / GCD ( r1 , r2 ) ) ; } public static void Main ( String [ ] args ) { int r1 = 4 , r2 = 6 ; ratiotang ( r1 , r2 ) ; } }

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

Class/struct names: GFG
C# program:
using System ; class GFG { static int remainingArea ( int N , int M , int K ) { while ( K -- > 0 && N > 0 && M > 0 ) { if ( N > M ) N = N - M ; else M = M - N ; } if ( N > 0 && M > 0 ) return N * M ; else return 0 ; } static public void Main ( ) { int N = 5 , M = 3 , K = 2 ; Console . WriteLine ( remainingArea ( N , M , K ) ) ; } }

Accumulator variables: K
Class/struct names: GFG
C# program:
using System ; class GFG { static void lengtang ( double r1 , double r2 ) { Console . WriteLine ( " The ▁ length ▁ of ▁ the ▁ " + " direct ▁ common ▁ tangent ▁ is ▁ " + ( 2 * Math . Sqrt ( r1 * r2 ) ) ) ; } static public void Main ( ) { double r1 = 5 , r2 = 9 ; lengtang ( r1 , r2 ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void dist ( double x1 , double y1 , double x2 , double y2 , double r ) { Console . WriteLine ( " The ▁ shortest ▁ distance ▁ " + " between ▁ a ▁ point ▁ and ▁ a ▁ circle ▁ is ▁ " + ( Math . Sqrt ( ( Math . Pow ( ( x2 - x1 ) , 2 ) ) + ( Math . Pow ( ( y2 - y1 ) , 2 ) ) ) - r ) ) ; } public static void Main ( String [ ] args ) { double x1 = 4 , y1 = 6 , x2 = 35 , y2 = 42 , r = 5 ; dist ( x1 , y1 , x2 , y2 , r ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double dist ( double m , double b1 , double b2 ) { double d = Math . Abs ( b2 - b1 ) / ( ( m * m ) - 1 ) ; return d ; } public static void Main ( ) { double m = 2 , b1 = 4 , b2 = 3 ; Console . Write ( dist ( m , b1 , b2 ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float normal ( float m , float n ) { float N = ( float ) ( ( Math . Abs ( m ) * Math . Abs ( n ) ) / Math . Sqrt ( ( Math . Abs ( m ) * Math . Abs ( m ) ) + ( Math . Abs ( n ) * Math . Abs ( n ) ) ) ) ; return N ; } public static void Main ( ) { float m = - 5 , n = 3 ; Console . Write ( normal ( m , n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static bool isPossible ( int [ ] a , int n ) { int sum = 0 , maxS = 0 ; for ( int i = 0 ; i < n ; i ++ ) { sum += a [ i ] ; maxS = Math . Max ( a [ i ] , maxS ) ; } if ( ( sum - maxS ) > maxS ) return true ; return false ; } static void Main ( ) { int [ ] a = { 2 , 3 , 4 } ; int n = a . Length ; if ( isPossible ( a , n ) ) 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 float findAreaShaded ( float a ) { float sqArea = a * a ; float semiCircleArea = ( float ) ( 3.14 * ( a * a ) / 8 ) ; float ShadedArea = 4 * semiCircleArea - sqArea ; return ShadedArea ; } public static void Main ( ) { float a = 10 ; Console . WriteLine ( findAreaShaded ( a ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GfG { static int countSteps ( int x , int y ) { if ( x < y ) { return x + y + 2 * ( ( y - x ) / 2 ) ; } else { return x + y + 2 * ( ( ( x - y ) + 1 ) / 2 ) ; } } public static void Main ( ) { int x = 4 , y = 3 ; Console . WriteLine ( countSteps ( x , y ) ) ; } }

Class/struct names: GfG
C# program:
using System ; using System . Collections . Generic ; class GfG { static bool isSlopeGood ( double slope , int [ ] arr , int n ) { HashSet < Double > setOfLines = new HashSet < Double > ( ) ; for ( int i = 0 ; i < n ; i ++ ) setOfLines . Add ( arr [ i ] - slope * ( i ) ) ; return setOfLines . Count == 2 ; } static bool checkForParallel ( int [ ] arr , int n ) { bool slope1 = isSlopeGood ( arr [ 1 ] - arr [ 0 ] , arr , n ) ; bool slope2 = isSlopeGood ( arr [ 2 ] - arr [ 1 ] , arr , n ) ; bool slope3 = isSlopeGood ( ( arr [ 2 ] - arr [ 0 ] ) / 2 , arr , n ) ; return ( slope1 == true slope2 == true slope3 == true ) ; } public static void Main ( ) { int [ ] arr = { 1 , 6 , 3 , 8 , 5 } ; int n = arr . Length ; if ( checkForParallel ( arr , n ) == true ) Console . WriteLine ( "1" ) ; else Console . WriteLine ( "0" ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GfG
C# program:
using System ; class GFG { static bool pointIsOnLine ( int m , int c , int x , int y ) { if ( y == ( ( m * x ) + c ) ) return true ; return false ; } public static void Main ( ) { int m = 3 , c = 2 ; int x = 1 , y = 5 ; if ( pointIsOnLine ( m , c , x , y ) ) Console . Write ( " Yes " ) ; else Console . Write ( " No " ) ; } }

Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GfG { static Pair < int , int > findFourthVertex ( int n , int m , String [ ] s ) { Dictionary < int , int > row = new Dictionary < int , int > ( ) ; Dictionary < int , int > col = new Dictionary < int , int > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < m ; j ++ ) { if ( s [ i ] [ j ] == ' * ' ) { if ( row . ContainsKey ( i ) ) { row [ i ] = row [ i ] + 1 ; } else { row . Add ( i , 1 ) ; } if ( col . ContainsKey ( j ) ) { col [ j ] = col [ j ] + 1 ; } else { col . Add ( j , 1 ) ; } } } } int x = 0 , y = 0 ; foreach ( KeyValuePair < int , int > entry in row ) { if ( entry . Value == 1 ) x = entry . Key ; } foreach ( KeyValuePair < int , int > entry in col ) { if ( entry . Value == 1 ) y = entry . Key ; } Pair < int , int > ans = new Pair < int , int > ( x + 1 , y + 1 ) ; return ans ; } public static void Main ( String [ ] args ) { String [ ] s = { " * . * " , " * . . " , " . . . " } ; int n = s . Length ; int m = s [ 0 ] . Length ; Pair < int , int > rs = findFourthVertex ( n , m , s ) ; Console . WriteLine ( rs . first + " ▁ " + rs . second ) ; } } class Pair < A , B > { public A first ; public B second ; public Pair ( A first , B second ) { this . first = first ; this . second = second ; } }

Index/key variables: i, j
Accumulator variables: i, j
Iterator variables: entry, i, j
Class/struct names: GfG, Pair
C# program:
using System ; class GFG { static double Area ( double a , double b ) { if ( a < 0 && b < 0 ) return - 1 ; double h = ( double ) Math . Sqrt ( ( ( Math . Pow ( a , 2 ) + Math . Pow ( b , 2 ) ) / ( Math . Pow ( a , 2 ) * Math . Pow ( b , 2 ) ) ) ) ; double A = ( double ) ( 0.70477 * Math . Pow ( h , 2 ) ) ; return A ; } static void Main ( ) { double a = 5 , b = 4 ; Console . WriteLine ( Math . Round ( Area ( a , b ) , 7 ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int maxRectangles ( int L , int B , int l , int b ) { int horizontal = 0 , vertical = 0 ; if ( l <= L && b <= B ) { int columns = B / b ; int rows = L / l ; horizontal = rows * columns ; } if ( l <= B && b <= L ) { int columns = L / b ; int rows = B / l ; vertical = rows * columns ; } return Math . Max ( horizontal , vertical ) ; } public static void Main ( ) { int L = 10 , B = 7 , l = 4 , b = 3 ; Console . WriteLine ( maxRectangles ( L , B , l , b ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double cone ( double a ) { if ( a < 0 ) return - 1 ; double r = ( double ) ( a * Math . Sqrt ( 2 ) ) / 3 ; double h = ( 2 * a ) / 3 ; double V = ( double ) ( 3.14 * Math . Pow ( r , 2 ) * h ) ; return Math . Round ( V , 4 ) ; } static void Main ( ) { double a = 5 ; Console . WriteLine ( cone ( a ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float Area ( float a ) { if ( a < 0 ) return - 1 ; float h = ( float ) 1.268 * a ; float A = ( float ) ( 0.70477 * Math . Pow ( h , 2 ) ) ; return A ; } public static void Main ( ) { float a = 5 ; Console . WriteLine ( Area ( a ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double Area ( double r ) { if ( r < 0 ) return - 1 ; double x = ( 2 * r ) / ( double ) ( Math . Sqrt ( 5 ) ) ; double A = 0.70477 * ( double ) ( Math . Pow ( x , 2 ) ) ; return A ; } public static void Main ( ) { double r = 5 ; Console . WriteLine ( Area ( r ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float Area ( float a ) { if ( a < 0 ) return - 1 ; float x = 0.464f * a ; float A = 0.70477f * ( float ) Math . Pow ( x , 2 ) ; return A ; } public static void Main ( ) { float a = 5 ; Console . WriteLine ( String . Format ( " { 0,0 : # .00000 } " , Area ( a ) ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double areaSquare ( double side , double fold ) { double area = side * side ; return area * 1.0 / Math . Pow ( 2 , fold ) ; } public static void Main ( ) { double side = 4 , fold = 2 ; Console . Write ( areaSquare ( side , fold ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double ReuleauxArea ( double r ) { if ( r < 0 ) return - 1 ; double A = 0.70477 * 2 * Math . Pow ( r , 2 ) ; return A ; } public static void Main ( ) { double r = 6 ; Console . WriteLine ( ReuleauxArea ( r ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float cyl ( float a ) { if ( a < 0 ) return - 1 ; float r = ( 2 * a * ( float ) ( Math . Sqrt ( 2 ) ) / 3 ) ; float h = ( 2 * a ) / 3 ; float V = ( 3.14f * ( float ) ( Math . Pow ( r , 2 ) * h ) ) ; return V ; } public static void Main ( ) { float a = 5 ; Console . Write ( cyl ( a ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double Area ( double l , double b , double h ) { if ( l < 0 b < 0 h < 0 ) return - 1 ; double x = ( l * b ) / ( l + b ) ; double A = 0.70477 * Math . Pow ( x , 2 ) ; return A ; } public static void Main ( ) { double l = 5 , b = 12 , h = 13 ; Console . WriteLine ( ( Area ( l , b , h ) ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float squareSide ( float a ) { if ( a < 0 ) return - 1 ; float x = ( 0.423f * a ) ; return x ; } public static void Main ( ) { float a = 8 ; Console . WriteLine ( squareSide ( a ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static bool isPossible ( float x , float y , float z ) { float a = x * x + y * y + z * z ; if ( Math . Ceiling ( a ) == 1 && Math . Floor ( a ) == 1 ) return true ; return false ; } public static void Main ( ) { float l = 0.70710678f , m = 0.5f , n = 0.5f ; if ( isPossible ( l , m , n ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }

Class/struct names: GFG
C# program:
using System ; public class GFG { static float polydiagonal ( float n , float a ) { if ( a < 0 && n < 0 ) { return - 1 ; } return ( float ) ( 2 * a * Math . Sin ( ( ( ( n - 2 ) * 180 ) / ( 2 * n ) ) * 3.14159 / 180 ) ) ; } static public void Main ( ) { float a = 9 , n = 10 ; Console . WriteLine ( polydiagonal ( n , a ) ) ; } }

Class/struct names: GFG
C# program:
using System ; public class GFG { static double decdiagonal ( double a ) { if ( a < 0 ) return - 1 ; double d = 1.902 * a ; return d ; } public static void Main ( ) { int a = 9 ; Console . WriteLine ( decdiagonal ( a ) ) ; } }

Class/struct names: GFG