dhyuti-n/xlcost-variable-roles huggingface dataset:
C# program:
using System ; class GFG { static int det ( int [ , ] d ) { int Sum = d [ 0 , 0 ] * ( ( d [ 1 , 1 ] * d [ 2 , 2 ] ) - ( d [ 2 , 1 ] * d [ 1 , 2 ] ) ) ; Sum -= d [ 0 , 1 ] * ( ( d [ 1 , 0 ] * d [ 2 , 2 ] ) - ( d [ 1 , 2 ] * d [ 2 , 0 ] ) ) ; Sum += d [ 0 , 2 ] * ( ( d [ 0 , 1 ] * d [ 1 , 2 ] ) - ( d [ 0 , 2 ] * d [ 1 , 1 ] ) ) ; return Sum ; } public static void Main ( ) { int x1 = - 3 , y1 = 1 , z1 = 5 ; int a1 = - 3 , b1 = 1 , c1 = 5 ; int x2 = - 1 , y2 = 2 , z2 = 5 ; int a2 = - 1 , b2 = 2 , c2 = 5 ; int [ , ] det_list = { { x2 - x1 , y2 - y1 , z2 - z1 } , { a1 , b1 , c1 } , { a2 , b2 , c2 } } ; if ( det ( det_list ) == 0 ) Console . Write ( " Lines ▁ are ▁ coplanar " ) ; else Console . Write ( " Lines ▁ are ▁ non ▁ coplanar " ) ; } }

Accumulator variables: Sum
Class/struct names: GFG
C# program:
using System ; class GFG { static double distance ( int r , int R ) { double d = Math . Sqrt ( Math . Pow ( R , 2 ) - ( 2 * r * R ) ) ; return d ; } public static void Main ( string [ ] args ) { int r = 2 ; int R = 5 ; Console . Write ( Math . Round ( distance ( r , R ) * 100.0 ) / 100.0 ) ; } }

Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { static readonly double PI = 3.141592653589 ; class pair { public double first , second ; public pair ( double first , double second ) { this . first = first ; this . second = second ; } } static double uniform ( ) { return new Random ( ) . NextDouble ( ) ; } static List < pair > randPoint ( int r , int x , int y , int n ) { List < pair > res = new List < pair > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { double theta = 2 * PI * uniform ( ) ; double len = Math . Sqrt ( uniform ( ) ) * r ; res . Add ( new pair ( x + len * Math . Cos ( theta ) , y + len * Math . Sin ( theta ) ) ) ; } return res ; } static void printList ( List < pair > A ) { foreach ( pair P in A ) { Console . Write ( " ( { 0 : F2 } , ▁ { 1 : F2 } ) STRNEWLINE " , P . first , P . second ) ; } } public static void Main ( String [ ] args ) { int R = 12 ; int X = 3 ; int Y = 3 ; int N = 5 ; printList ( randPoint ( R , X , Y , N ) ) ; } }

Accumulator variables: i
Iterator variables: P, i
Class/struct names: GFG, pair
C# program:
using System ; class GFG { static void checkValidPolygon ( int [ ] arr , int N ) { int sum = 0 ; for ( int i = 0 ; i < N ; i ++ ) { sum += arr [ i ] ; } if ( sum == 180 * ( N - 2 ) ) Console . Write ( " Yes " ) ; else Console . Write ( " No " ) ; } public static void Main ( string [ ] args ) { int N = 3 ; int [ ] arr = { 60 , 60 , 60 } ; checkValidPolygon ( arr , N ) ; } }

Index/key variables: i
Accumulator variables: i, sum
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { public static int minimalSquareSide ( int a , int b ) { if ( a == b ) { return 2 * a ; } if ( a != b ) { if ( a > b ) { int newB = b + b ; int diff = Math . Abs ( newB - a ) ; if ( newB < a ) { b = newB + diff ; if ( a == b ) return a ; return 0 ; } else { a = a + diff ; if ( a == newB ) return a ; return 0 ; } } else { int newA = a + a ; int diff = Math . Abs ( newA - b ) ; if ( newA < b ) { a = diff + newA ; if ( a == b ) return a ; return 0 ; } else { b = b + diff ; if ( b == newA ) return b ; return 0 ; } } } return 0 ; } public static void Main ( String [ ] args ) { int H , W ; H = 3 ; W = 1 ; Console . WriteLine ( minimalSquareSide ( H , W ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double minAnglRot ( int N ) { double res ; res = 360 / ( double ) N ; return res ; } public static void Main ( string [ ] args ) { int N = 4 ; Console . Write ( " Angle ▁ of ▁ Rotational ▁ Symmetry : ▁ " + minAnglRot ( N ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double Area_of_Triangle ( int a , int b , int c ) { int s = ( a + b + c ) / 2 ; int x = s * ( s - a ) ; x = x * ( s - b ) ; x = x * ( s - c ) ; double area = ( 4 / ( double ) 3 ) * Math . Sqrt ( x ) ; return area ; } public static void Main ( String [ ] args ) { int a = 9 ; int b = 12 ; int c = 15 ; double ans = Area_of_Triangle ( a , b , c ) ; Console . WriteLine ( ans ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static readonly int MAX = 1001 ; static bool [ , ] arr = new bool [ MAX , MAX ] ; static void updateArray ( int x1 , int y1 , int x2 , int y2 ) { for ( int i = x1 ; i < x2 ; i ++ ) { for ( int j = y1 ; j < y2 ; j ++ ) { arr [ i , j ] = true ; } } } static int findAreaCovered ( ) { int area = 0 ; for ( int i = 0 ; i < MAX ; i ++ ) { for ( int j = 0 ; j < MAX ; j ++ ) { if ( arr [ i , j ] == true ) { area ++ ; } } } return area ; } public static void Main ( String [ ] args ) { int N = 3 ; int [ , ] A = { { 1 , 3 , 4 , 5 } , { 3 , 1 , 7 , 4 } , { 5 , 3 , 8 , 6 } } ; for ( int i = 0 ; i < N ; i ++ ) { updateArray ( A [ i , 0 ] , A [ i , 1 ] , A [ i , 2 ] , A [ i , 3 ] ) ; } int area = findAreaCovered ( ) ; Console . Write ( area ) ; } }

Accumulator variables: area, i, j
Iterator variables: i, j
Class/struct names: GFG
C# program:
using System ; class GFG { static void findEquation ( int x1 , int y1 , int z1 , int x2 , int y2 , int z2 , int d , int e , int f ) { double a = x2 - x1 ; double b = y2 - y1 ; double c = z2 - z1 ; int A = ( int ) ( b * f - c * e ) ; int B = ( int ) ( a * f - c * d ) ; int C = ( int ) ( a * e - b * d ) ; int D = - ( int ) ( A * d - B * e + C * f ) ; Console . Write ( A + " x ▁ + ▁ " + B + " y ▁ + ▁ " + C + " z ▁ + ▁ " + D + " = ▁ 0 ▁ " ) ; } public static void Main ( ) { int x1 = 2 , y1 = 3 , z1 = 5 ; int x2 = 6 , y2 = 7 , z2 = 8 ; int a = 11 , b = 23 , c = 10 ; findEquation ( x1 , y1 , z1 , x2 , y2 , z2 , a , b , c ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { public static float median ( int a , int b , int c ) { float n = ( float ) ( Math . Sqrt ( 2 * b * b + 2 * c * c - a * a ) / 2 ) ; return n ; } public static void Main ( String [ ] args ) { int a , b , c ; a = 4 ; b = 3 ; c = 5 ; float ans = median ( a , b , c ) ; Console . WriteLine ( String . Format ( " { 0 : F2 } " , ans ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int nCr ( int n , int r ) { return ( fact ( n ) / ( fact ( r ) * fact ( n - r ) ) ) ; } static int fact ( int n ) { int res = 1 ; for ( int i = 2 ; i < n + 1 ; i ++ ) res = res * i ; return res ; } public static void Main ( String [ ] args ) { int n = 5 ; Console . Write ( nCr ( n , 4 ) ) ; } }

Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void findSide ( float a , double B , double C ) { double A = 180 - C - B ; double radA = ( Math . PI * ( A / 180 ) ) ; double radB = ( Math . PI * ( B / 180 ) ) ; double radC = ( Math . PI * ( C / 180 ) ) ; double b = ( a / Math . Sin ( radA ) * Math . Sin ( radB ) ) ; double c = ( a / Math . Sin ( radA ) * Math . Sin ( radC ) ) ; Console . Write ( " { 0 : F15 } " , b ) ; Console . Write ( " { 0 : F15 } " , c ) ; } public static void Main ( String [ ] args ) { int a = 12 , B = 60 , C = 30 ; findSide ( a , B , C ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { public static int areaSquare ( int L , int B ) { int large = Math . Max ( L , B ) ; int small = Math . Min ( L , B ) ; if ( large >= 2 * small ) { return large * large ; } else { return ( 2 * small ) * ( 2 * small ) ; } } public static void Main ( ) { int L = 7 ; int B = 4 ; Console . Write ( areaSquare ( L , B ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double pi = Math . Acos ( - 1.0 ) ; static double nGon ( int N ) { double proAngleVar ; if ( N % 4 == 0 ) { proAngleVar = pi * ( 180.0 / N ) / 180 ; } else { proAngleVar = pi * ( 180.0 / ( 2 * N ) ) / 180 ; } double negX = 1.0e+99 , posX = - 1.0e+99 , negY = 1.0e+99 , posY = - 1.0e+99 ; for ( int j = 0 ; j < N ; ++ j ) { double px = Math . Cos ( 2 * pi * j / N + proAngleVar ) ; double py = Math . Sin ( 2 * pi * j / N + proAngleVar ) ; negX = Math . Min ( negX , px ) ; posX = Math . Max ( posX , px ) ; negY = Math . Min ( negY , py ) ; posY = Math . Max ( posY , py ) ; } double opt2 = Math . Max ( posX - negX , posY - negY ) ; return ( double ) opt2 / Math . Sin ( pi / N ) / 2 ; } public static void Main ( ) { int N = 10 ; Console . Write ( string . Format ( " { 0 : F5 } " , nGon ( N ) ) ) ; } }

Iterator variables: j
Class/struct names: GFG
C# program:
using System ; class GFG { static int heptacontagonNum ( int n ) { return ( 68 * n * n - 66 * n ) / 2 ; } public static void Main ( ) { int N = 3 ; Console . Write ( "3rd ▁ heptacontagon ▁ Number ▁ is ▁ = ▁ " + heptacontagonNum ( N ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static bool isicositetragonal ( int N ) { float n = ( float ) ( ( 10 + Math . Sqrt ( 44 * N + 100 ) ) / 22 ) ; return ( n - ( int ) n ) == 0 ; } public static void Main ( ) { int i = 24 ; if ( isicositetragonal ( i ) ) { Console . Write ( " Yes " ) ; } else { Console . Write ( " No " ) ; } } }

Class/struct names: GFG
C# program:
using System ; class GFG { static bool isTridecagon ( int N ) { float n = ( float ) ( ( 9 + Math . Sqrt ( 88 * N + 81 ) ) / 22 ) ; return ( n - ( int ) n ) == 0 ; } public static void Main ( ) { int i = 13 ; if ( isTridecagon ( i ) ) { Console . Write ( " Yes " ) ; } else { Console . Write ( " No " ) ; } } }

Class/struct names: GFG
C# program:
using System ; class GFG { static bool isicosihenagonal ( int N ) { float n = ( float ) ( ( 17 + Math . Sqrt ( 152 * N + 289 ) ) / 38 ) ; return ( n - ( int ) n ) == 0 ; } public static void Main ( ) { int i = 21 ; if ( isicosihenagonal ( i ) ) { Console . Write ( " Yes " ) ; } else { Console . Write ( " No " ) ; } } }

Class/struct names: GFG
C# program:
using System ; class GFG { static bool isicositrigonal ( int N ) { float n = ( float ) ( 19 + Math . Sqrt ( 168 * N + 361 ) ) / 42 ; return ( n - ( int ) n ) == 0 ; } public static void Main ( ) { int i = 23 ; if ( isicositrigonal ( i ) ) { Console . Write ( " Yes " ) ; } else { Console . Write ( " No " ) ; } } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void checkTriangle ( int x1 , int y1 , int x2 , int y2 , int x3 , int y3 ) { int a = x1 * ( y2 - y3 ) + x2 * ( y3 - y1 ) + x3 * ( y1 - y2 ) ; if ( a == 0 ) Console . WriteLine ( " No " ) ; else Console . WriteLine ( " Yes " ) ; } public static void Main ( ) { int x1 = 1 , y1 = 1 , x2 = 2 , y2 = 2 , x3 = 3 , y3 = 3 ; checkTriangle ( x1 , y1 , x2 , y2 , x3 , y3 ) ; } }

Class/struct names: GFG
C# program:
using System ; using System . Collections ; using System . Collections . Generic ; class GFG { class pair { public int first , second ; public pair ( int first , int second ) { this . first = first ; this . second = second ; } } static int numTrip ( ArrayList points ) { int res = 0 ; for ( int i = 0 ; i < points . Count ; ++ i ) { Dictionary < long , int > map = new Dictionary < long , int > ( ) ; for ( int j = 0 ; j < points . Count ; ++ j ) { if ( j == i ) continue ; int dy = ( ( pair ) points [ i ] ) . second - ( ( pair ) points [ j ] ) . second ; int dx = ( ( pair ) points [ i ] ) . first - ( ( pair ) points [ j ] ) . first ; int key = dy * dy ; key += dx * dx ; if ( map . ContainsKey ( key ) ) { map [ key ] ++ ; } else { map [ key ] = 1 ; } } foreach ( int p in map . Values ) res += p * ( p - 1 ) ; } return res ; } public static void Main ( string [ ] args ) { ArrayList mat = new ArrayList ( ) { new pair ( 0 , 0 ) , new pair ( 1 , 0 ) , new pair ( 2 , 0 ) } ; Console . Write ( numTrip ( mat ) ) ; } }

Index/key variables: i, j, key
Accumulator variables: key, res
Iterator variables: i, j, p
Class/struct names: GFG, pair
C# program:
using System ; class GFG { static bool checkOverlap ( int R , int Xc , int Yc , int X1 , int Y1 , int X2 , int Y2 ) { int Xn = Math . Max ( X1 , Math . Min ( Xc , X2 ) ) ; int Yn = Math . Max ( Y1 , Math . Min ( Yc , Y2 ) ) ; int Dx = Xn - Xc ; int Dy = Yn - Yc ; return ( Dx * Dx + Dy * Dy ) <= R * R ; } public static void Main ( ) { int R = 1 ; int Xc = 0 , Yc = 0 ; int X1 = 1 , Y1 = - 1 ; int X2 = 3 , Y2 = 1 ; if ( checkOverlap ( R , Xc , Yc , X1 , Y1 , X2 , Y2 ) ) { Console . Write ( " True " + " STRNEWLINE " ) ; } else { Console . Write ( " False " ) ; } } }

Class/struct names: GFG
C# program:
using System ; class GFG { class pair { public int first , second ; public pair ( int first , int second ) { this . first = first ; this . second = second ; } } static int checkIntersection ( pair p1 , pair p2 , pair p ) { int val ; if ( p1 . second == p2 . second && p1 . second == p . second ) { if ( p . first <= Math . Max ( p1 . first , p2 . first ) && ( p . first >= Math . Min ( p1 . first , p2 . first ) ) ) return 1 ; } if ( p1 . first == p2 . first && p1 . first == p . first ) { if ( p . second <= Math . Max ( p1 . second , p2 . second ) && ( p . second >= Math . Min ( p1 . second , p2 . second ) ) ) return 1 ; } else { val = ( p . second - p1 . second ) * ( p2 . first - p1 . first ) - ( p . first - p1 . first ) * ( p2 . second - p1 . second ) ; if ( val == 0 ) if ( ( p . first <= Math . Max ( p1 . first , p2 . first ) && ( p . first >= Math . Min ( p1 . first , p2 . first ) ) ) && ( p . second <= Math . Max ( p1 . second , p2 . second ) && ( p . second >= Math . Min ( p1 . second , p2 . second ) ) ) ) return 1 ; } return 0 ; } static void towerOfSight ( pair a , pair b , pair c , pair d ) { int flag = 0 ; if ( checkIntersection ( a , c , b ) == 1 ) flag = 1 ; else if ( checkIntersection ( a , c , d ) == 1 ) flag = 1 ; else if ( checkIntersection ( b , d , a ) == 1 ) flag = 1 ; else if ( checkIntersection ( b , d , c ) == 1 ) flag = 1 ; Console . Write ( flag == 1 ? " Yes STRNEWLINE " : " No STRNEWLINE " ) ; } public static void Main ( String [ ] args ) { pair a = new pair ( 0 , 0 ) ; pair b = new pair ( 0 , - 2 ) ; pair c = new pair ( 2 , 0 ) ; pair d = new pair ( 0 , 2 ) ; towerOfSight ( a , b , c , d ) ; } }

Class/struct names: GFG, pair
C# program:
using System ; using System . Collections . Generic ; class GFG { static int NotParallel ( int [ , ] p , int n ) { Dictionary < int , int > x_axis = new Dictionary < int , int > ( ) ; Dictionary < int , int > y_axis = new Dictionary < int , int > ( ) ; for ( int i = 0 ; i < n ; i ++ ) { if ( x_axis . ContainsKey ( p [ i , 0 ] ) ) x_axis [ p [ i , 0 ] ] = x_axis [ p [ i , 0 ] ] + 1 ; else x_axis . Add ( p [ i , 0 ] , 1 ) ; if ( y_axis . ContainsKey ( p [ i , 1 ] ) ) y_axis [ p [ i , 1 ] ] = y_axis [ p [ i , 1 ] ] + 1 ; else y_axis . Add ( p [ i , 1 ] , 1 ) ; } int total = ( n * ( n - 1 ) ) / 2 ; foreach ( KeyValuePair < int , int > i in x_axis ) { int c = i . Value ; total -= ( c * ( c - 1 ) ) / 2 ; } foreach ( KeyValuePair < int , int > i in y_axis ) { int c = i . Value ; total -= ( c * ( c - 1 ) ) / 2 ; } return total ; } public static void Main ( String [ ] args ) { int [ , ] p = { { 1 , 2 } , { 1 , 5 } , { 1 , 15 } , { 2 , 10 } } ; int n = p . GetLength ( 0 ) ; Console . Write ( NotParallel ( p , n ) ) ; } }

Accumulator variables: i, total
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static int check ( int n , int m ) { if ( m % n == 0 ) { Console . Write ( " YES " ) ; } else { Console . Write ( " NO " ) ; } return 0 ; } public static void Main ( String [ ] args ) { int n = 5 ; int m = 10 ; check ( n , m ) ; } }

Class/struct names: GFG
C# program:
using System ; public class GFG { static void findModulo ( String s ) { int l = s . Length ; int i ; if ( s . Contains ( " + " ) ) { i = s . IndexOf ( " + " ) ; } else { i = s . IndexOf ( " - " ) ; } String real = s . Substring ( 0 , i ) ; String imaginary = s . Substring ( i + 1 , l - i - 2 ) ; int x = Int32 . Parse ( real ) ; int y = Int32 . Parse ( imaginary ) ; Console . Write ( Math . Sqrt ( x * x + y * y ) + " STRNEWLINE " ) ; } public static void Main ( String [ ] args ) { String s = "3 + 4i " ; findModulo ( s ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void disp ( int row_no , int block ) { Console . Write ( row_no * block ) ; } static int row ( int ht , int h ) { return ht / h ; } static void calculate ( int l , int w , int h , int a , int ht ) { int no_block = ( 4 * a ) / l ; int row_no ; if ( h < w ) row_no = row ( ht , w ) ; else row_no = row ( ht , h ) ; disp ( row_no , no_block ) ; } public static void Main ( String [ ] args ) { int l = 50 , w = 20 , h = 35 ; int a = 700 ; int ht = 140 ; calculate ( l , w , h , a , ht ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double solve ( int s ) { double area = ( 1.732 * Math . Pow ( s , 2 ) ) / 8 ; return area ; } public static void Main ( String [ ] args ) { int n = 14 ; Console . WriteLine ( solve ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float find_Area ( float a ) { float R = a * ( float ) ( 2.0 - Math . Sqrt ( 2 ) ) ; float area = ( float ) ( ( 3.14 * R * R ) / 2.0 ) ; return area ; } public static void Main ( string [ ] args ) { float a = 4 ; Console . WriteLine ( " ▁ Area ▁ of ▁ semicircle ▁ = ▁ " + find_Area ( a ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int times ( int [ ] steps , int n ) { int current_level = 0 ; int previous_level = 0 ; int count = 0 ; for ( int i = 0 ; i < n ; i ++ ) { previous_level = current_level ; current_level = current_level + steps [ i ] ; if ( ( previous_level < 0 && current_level >= 0 ) || ( previous_level > 0 && current_level <= 0 ) ) { count ++ ; } } return count ; } public static void Main ( ) { int [ ] steps = { 1 , - 1 , 0 , 0 , 1 , 1 , - 3 , 2 } ; int n = steps . Length ; Console . WriteLine ( times ( steps , n ) ) ; } }

Index/key variables: i
Accumulator variables: count, i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static double [ ] XandYandZintercept ( double A , double B , double C , double D ) { double [ ] rslt = new double [ 3 ] ; double x = - D / A ; double y = - D / B ; double z = - D / C ; rslt [ 0 ] = x ; rslt [ 1 ] = y ; rslt [ 2 ] = z ; return rslt ; } static void equation_plane ( int [ ] p , int [ ] q , int [ ] r ) { int x1 = p [ 0 ] ; int y1 = p [ 1 ] ; int z1 = p [ 2 ] ; int x2 = q [ 0 ] ; int y2 = q [ 1 ] ; int z2 = q [ 2 ] ; int x3 = r [ 0 ] ; int y3 = r [ 1 ] ; int z3 = r [ 2 ] ; int a1 = x2 - x1 ; int b1 = y2 - y1 ; int c1 = z2 - z1 ; int a2 = x3 - x1 ; int b2 = y3 - y1 ; int c2 = z3 - z1 ; int A = ( b1 * c2 - b2 * c1 ) ; int B = ( a2 * c1 - a1 * c2 ) ; int C = ( a1 * b2 - b1 * a2 ) ; int D = ( - A * x1 - B * y1 - C * z1 ) ; double [ ] rslt = XandYandZintercept ( A , B , C , D ) ; for ( int i = 0 ; i < 3 ; i ++ ) { Console . Write ( rslt [ i ] + " ▁ " ) ; } } static void Main ( ) { int x1 = - 1 ; int y1 = 2 ; int z1 = 1 ; int x2 = 0 ; int y2 = - 3 ; int z2 = 2 ; int x3 = 1 ; int y3 = 1 ; int z3 = - 4 ; int [ ] p = { x1 , y1 , z1 } ; int [ ] q = { x2 , y2 , z2 } ; int [ ] r = { x3 , y3 , z3 } ; equation_plane ( p , q , r ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Class/struct names: GFG
C# program:
using System ; class GFG { static void new_vol ( double x ) { if ( x > 0 ) { Console . Write ( " % ▁ change ▁ in ▁ the ▁ " + " volume ▁ of ▁ the ▁ hemisphere : ▁ " + ( Math . Pow ( x , 3 ) / 10000 + 3 * x + ( 3 * Math . Pow ( x , 2 ) ) / 100 ) + " % " + " ▁ increase STRNEWLINE " ) ; } else if ( x < 0 ) { Console . Write ( " % ▁ change ▁ in ▁ the ▁ " + " volume ▁ of ▁ the ▁ hemisphere : ▁ " + ( Math . Pow ( x , 3 ) / 10000 + 3 * x + ( 3 * Math . Pow ( x , 2 ) ) / 100 ) + " % ▁ decrease STRNEWLINE " ) ; } else { Console . Write ( " Volume ▁ remains ▁ the ▁ same . " ) ; } } public static void Main ( ) { double x = - 10.0 ; new_vol ( x ) ; } }

Class/struct names: GFG
C# program:
using System ; using System . Collections . Generic ; class GFG { class pair { public int first , second ; public pair ( int first , int second ) { this . first = first ; this . second = second ; } } static List < pair > FindPoints ( int n ) { List < pair > v = new List < pair > ( ) ; v . Add ( new pair ( 0 , 0 ) ) ; v . Add ( new pair ( 0 , n ) ) ; v . Add ( new pair ( n , 0 ) ) ; v . Add ( new pair ( n , n ) ) ; if ( n % 2 == 0 ) v . Add ( new pair ( n / 2 , n / 2 ) ) ; return v ; } public static void Main ( String [ ] args ) { int N = 8 ; List < pair > v = FindPoints ( N ) ; foreach ( pair i in v ) { Console . Write ( " ( " + i . first + " , ▁ " + i . second + " ) ▁ " ) ; } } }

Iterator variables: i
Class/struct names: GFG, pair
C# program:
using System ; class GFG { static double pie = 3.1415926535897 ; static double findsolution ( double d , double h , double m , double n ) { double k = ( 4 * m ) / ( pie * d * d ) ; if ( n > k ) return - 1 ; double ans = ( h / ( k - n ) ) ; return ans ; } public static void Main ( String [ ] args ) { double d = 1 , h = 1 , m = 1 , n = 1 ; Console . Write ( " { 0 : F5 } " , findsolution ( d , h , m , n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int sumOfInternalAngles ( int n ) { if ( n < 3 ) return 0 ; return ( ( n - 2 ) * 180 ) ; } public static void Main ( ) { int n = 5 ; Console . Write ( sumOfInternalAngles ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int cntWays ( int n ) { if ( n % 2 == 1 ) { return 0 ; } else { return ( n - 2 ) / 4 ; } } public static void Main ( String [ ] args ) { int n = 18 ; Console . WriteLine ( cntWays ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int noOfTriangles ( int n ) { int y = 4 * n ; return ( ( y * ( y - 2 ) * ( y - 1 ) ) - ( 4 * n * ( n - 2 ) * ( n - 1 ) ) ) / 6 ; } public static void Main ( String [ ] args ) { int n = 1 ; Console . WriteLine ( noOfTriangles ( n ) ) ; } }

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

Class/struct names: GFG
C# program:
using System ; class GFG { public static bool orthogonality ( int x1 , int y1 , int x2 , int y2 , int r1 , int r2 ) { int dsquare = ( x1 - x2 ) * ( x1 - x2 ) + ( y1 - y2 ) * ( y1 - y2 ) ; if ( dsquare == r1 * r1 + r2 * r2 ) return true ; else return false ; } public static void Main ( ) { int x1 = 4 , y1 = 3 ; int x2 = 0 , y2 = 1 ; int r1 = 2 , r2 = 4 ; bool f = orthogonality ( x1 , y1 , x2 , y2 , r1 , r2 ) ; if ( f ) Console . WriteLine ( " Given ▁ circles ▁ are ▁ orthogonal . " ) ; else Console . WriteLine ( " Given ▁ circles ▁ are ▁ not ▁ orthogonal . " ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int [ ] dx = { - 1 , 0 , 1 , 0 } ; static int [ ] dy = { 0 , 1 , 0 , - 1 } ; static bool ifRight ( int x1 , int y1 , int x2 , int y2 , int x3 , int y3 ) { int a = ( ( x1 - x2 ) * ( x1 - x2 ) ) + ( ( y1 - y2 ) * ( y1 - y2 ) ) ; int b = ( ( x1 - x3 ) * ( x1 - x3 ) ) + ( ( y1 - y3 ) * ( y1 - y3 ) ) ; int c = ( ( x2 - x3 ) * ( x2 - x3 ) ) + ( ( y2 - y3 ) * ( y2 - y3 ) ) ; if ( ( a == ( b + c ) && a != 0 && b != 0 && c != 0 ) || ( b == ( a + c ) && a != 0 && b != 0 && c != 0 ) || ( c == ( a + b ) && a != 0 && b != 0 && c != 0 ) ) { return true ; } return false ; } static void isValidCombination ( int x1 , int y1 , int x2 , int y2 , int x3 , int y3 ) { int x , y ; bool possible = false ; if ( ifRight ( x1 , y1 , x2 , y2 , x3 , y3 ) ) { Console . WriteLine ( " ALREADY ▁ RIGHT ▁ ANGLED " ) ; return ; } else { for ( int i = 0 ; i < 4 ; i ++ ) { x = dx [ i ] + x1 ; y = dy [ i ] + y1 ; if ( ifRight ( x , y , x2 , y2 , x3 , y3 ) ) { Console . WriteLine ( " POSSIBLE " ) ; return ; } x = dx [ i ] + x2 ; y = dy [ i ] + y2 ; if ( ifRight ( x1 , y1 , x , y , x3 , y3 ) ) { Console . WriteLine ( " POSSIBLE " ) ; return ; } x = dx [ i ] + x3 ; y = dy [ i ] + y3 ; if ( ifRight ( x1 , y1 , x2 , y2 , x , y ) ) { Console . Write ( " POSSIBLE " ) ; return ; } } } if ( ! possible ) Console . WriteLine ( " NOT ▁ POSSIBLE " ) ; } static public void Main ( ) { int x1 = - 49 , y1 = 0 ; int x2 = 0 , y2 = 50 ; int x3 = 0 , y3 = - 50 ; isValidCombination ( x1 , y1 , x2 , y2 , x3 , y3 ) ; } }

Index/key variables: i
Accumulator variables: i
Iterator variables: i
Boolean variables: possible
Class/struct names: GFG