dhyuti-n/xlcost-variable-roles huggingface dataset:
C# program:
using System ; public class GFG { static double heptdiagonal ( double a ) { if ( a < 0 ) return - 1 ; double d = 1.802 * a ; return d ; } public static void Main ( ) { int a = 6 ; Console . WriteLine ( heptdiagonal ( a ) ) ; }

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

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

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

Class/struct names: Solution
C# program:
using System ; public class GFG { static float CubeVolume ( float d ) { float Volume ; Volume = ( float ) ( Math . Sqrt ( 3 ) * Math . Pow ( d , 3 ) ) / 9 ; return Volume ; } public static void Main ( ) { float d = 5 ; Console . WriteLine ( " Volume ▁ of ▁ Cube : ▁ { 0 : F4 } " , CubeVolume ( d ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { public static double per ( double a , double b ) { return ( a + b ) ; } public static double area ( double s ) { return ( s / 2 ) ; } public static void Main ( ) { double a = 7.0 , b = 8.0 , s = 10.0 ; Console . WriteLine ( per ( a , b ) ) ; Console . Write ( area ( s ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double PI = 3.14159265 ; public static double area_leaf ( double a ) { return ( a * a * ( PI / 2 - 1 ) ) ; } public static void Main ( ) { double a = 7 ; Console . Write ( area_leaf ( a ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double PI = 3.14159265 ; public static double length_rope ( double r ) { return ( ( 2 * PI * r ) + 6 * r ) ; } public static void Main ( ) { double r = 7.0 ; Console . Write ( length_rope ( r ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double PI = 3.14159265 ; public static double area_inscribed ( double P , double B , double H ) { return ( ( P + B - H ) * ( P + B - H ) * ( PI / 4 ) ) ; } public static void Main ( ) { double P = 3.0 , B = 4.0 , H = 5.0 ; Console . Write ( area_inscribed ( P , B , H ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double PI = 3.14159265 ; public static double area_cicumscribed ( double c ) { return ( c * c * ( PI / 4 ) ) ; } public static void Main ( ) { double c = 8.0 ; Console . Write ( area_cicumscribed ( c ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double cyl ( double r , double h ) { if ( r < 0 && h < 0 ) return - 1 ; double R = ( 2 * r ) / 3 ; double H = ( 2 * h ) / 3 ; double V = 3.14 * Math . Pow ( R , 2 ) * H ; return V ; } static public void Main ( ) { double r = 4 , h = 8 ; Console . WriteLine ( cyl ( r , h ) ) ; } }

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

Class/struct names: GFG
C# program:
using System ; class GFG { static float sph ( float r , float h ) { if ( r < 0 && h < 0 ) return - 1 ; float R = r ; return R ; } public static void Main ( ) { float r = 4 , h = 8 ; Console . WriteLine ( sph ( r , h ) ) ; } }

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

Class/struct names: GFG
C# program:
using System ; class GFG { static float rod ( float h , float r ) { if ( h < 0 && r < 0 ) return - 1 ; float l = ( float ) ( Math . Sqrt ( Math . Pow ( h , 2 ) + 4 * Math . Pow ( r , 2 ) ) ) ; return l ; } public static void Main ( ) { float h = 4 ; float r = 1.5f ; Console . WriteLine ( rod ( h , r ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double PI = 3.14159265 ; public static double area_inscribed ( double a ) { return ( a * a * ( PI / 12 ) ) ; } public static double perm_inscribed ( double a ) { return ( PI * ( a / Math . Sqrt ( 3 ) ) ) ; } public static void Main ( ) { double a = 6.0 ; Console . Write ( " Area ▁ of ▁ inscribed ▁ circle ▁ is ▁ : " + area_inscribed ( a ) ) ; Console . Write ( " STRNEWLINE Perimeter ▁ of ▁ inscribed ▁ circle ▁ is ▁ : " + perm_inscribed ( a ) ) ; } }

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

Class/struct names: GFG
C# program:
using System ; class GFG { static float coner ( float R ) { if ( R < 0 ) return - 1 ; float r = ( float ) ( 2 * Math . Sqrt ( 2 ) * R ) / 3 ; return r ; } static float coneh ( float R ) { if ( R < 0 ) return - 1 ; float h = ( 4 * R ) / 3 ; return h ; } public static void Main ( ) { float R = 10 ; Console . WriteLine ( " r ▁ = ▁ " + coner ( R ) + " , ▁ " + " h ▁ = ▁ " + coneh ( R ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float coneRadius ( float a ) { if ( a < 0 ) return - 1 ; float r = ( float ) ( a / Math . Sqrt ( 2 ) ) ; return r ; } static float coneHeight ( float a ) { if ( a < 0 ) return - 1 ; float h = a ; return h ; } public static void Main ( ) { float a = 6 ; Console . WriteLine ( " r ▁ = ▁ " + coneRadius ( a ) + " , ▁ " + " h ▁ = ▁ " + coneHeight ( a ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class Solution { static float largestCube ( float r ) { if ( r < 0 ) return - 1 ; float a = ( 2 * r ) / ( float ) Math . Sqrt ( 3 ) ; return a ; } static void Main ( ) { float r = 5 ; Console . WriteLine ( largestCube ( r ) ) ; } }

Class/struct names: Solution
C# program:
using System ; class GFG { static float sphere ( float a ) { if ( a < 0 ) return - 1 ; float r = a / 2 ; return r ; } static public void Main ( ) { float a = 5 ; Console . WriteLine ( sphere ( a ) ) ; } }

Class/struct names: GFG
C# program:
using System ; public class GFG { static int numberOfCuts ( int M , int N ) { int result = 0 ; result = ( M - 1 ) * ( N - 1 ) ; return result ; } static public void Main ( ) { int M = 4 , N = 4 ; int Cuts = numberOfCuts ( M , N ) ; Console . WriteLine ( " Maximum ▁ cuts ▁ = ▁ " + Cuts ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float maxVol ( float P , float A ) { float l = ( float ) ( P - Math . Sqrt ( P * P - 24 * A ) ) / 12 ; float V = ( float ) ( l * ( A / 2.0 - l * ( P / 4.0 - l ) ) ) ; return V ; } public static void Main ( ) { float P = 20 , A = 16 ; Console . WriteLine ( maxVol ( P , A ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int rhombusAreaPeri ( int d1 , int d2 ) { int area , perimeter ; area = ( d1 * d2 ) / 2 ; perimeter = ( int ) ( 2 * Math . Sqrt ( Math . Pow ( d1 , 2 ) + Math . Pow ( d2 , 2 ) ) ) ; Console . WriteLine ( " The ▁ area ▁ of ▁ rhombus ▁ with ▁ " + " diagonals ▁ " + d1 + " ▁ and ▁ " + d2 + " ▁ is ▁ " + area + " . " ) ; Console . WriteLine ( " The ▁ perimeter ▁ of ▁ rhombus ▁ " + " with ▁ diagonals ▁ " + d1 + " ▁ and ▁ " + d2 + " ▁ is ▁ " + perimeter + " . " ) ; return 0 ; } public static void Main ( ) { int d1 = 2 , d2 = 4 ; rhombusAreaPeri ( d1 , d2 ) ; } }

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

Class/struct names: GFG
C# program:
using System ; class GFG { static int maxArea ( float perimeter ) { int length = ( int ) Math . Ceiling ( perimeter / 4 ) ; int breadth = ( int ) Math . Floor ( perimeter / 4 ) ; return length * breadth ; } public static void Main ( ) { float n = 38 ; Console . WriteLine ( " Maximum ▁ Area ▁ = ▁ " + maxArea ( n ) ) ; } }

Class/struct names: GFG
C# program:
using System ; using System . Globalization ; class GFG { static void foot ( float a , float b , float c , float d , float x1 , float y1 , float z1 ) { float k = ( - a * x1 - b * y1 - c * z1 - d ) / ( float ) ( a * a + b * b + c * c ) ; float x2 = a * k + x1 ; float y2 = b * k + y1 ; float z2 = c * k + z1 ; NumberFormatInfo form = new NumberFormatInfo ( ) ; form . NumberDecimalSeparator = " . " ; Console . Write ( " ▁ x2 ▁ = ▁ " + x2 . ToString ( form ) ) ; Console . Write ( " ▁ y2 ▁ = ▁ " + y2 . ToString ( form ) ) ; Console . Write ( " ▁ z2 ▁ = ▁ " + z2 . ToString ( form ) ) ; } public static void Main ( String [ ] arr ) { float a = 1 ; float b = - 2 ; float c = 0 ; float d = 0 ; float x1 = - 1 ; float y1 = 3 ; float z1 = 4 ; foot ( a , b , c , d , x1 , y1 , z1 ) ; } }

Class/struct names: GFG
C# program:
using System ; class solution { static void equation_parabola ( float x1 , float y1 , float a , float b , float c ) { float t = a * a + b * b ; float a1 = t - ( a * a ) ; float b1 = t - ( b * b ) ; float c1 = ( - 2 * t * x1 ) - ( 2 * c * a ) ; float d1 = ( - 2 * t * y1 ) - ( 2 * c * b ) ; float e1 = - 2 * a * b ; float f1 = ( - c * c ) + ( t * x1 * x1 ) + ( t * y1 * y1 ) ; Console . WriteLine ( " equation ▁ of ▁ parabola ▁ is ▁ " + a1 + " ▁ x ^ 2 ▁ + ▁ " + b1 + " ▁ y ^ 2 ▁ + ▁ " + c1 + " ▁ x ▁ + ▁ " + d1 + " ▁ y ▁ + ▁ " + e1 + " ▁ xy ▁ + ▁ " + f1 + " ▁ = ▁ 0 . " ) ; } public static void Main ( ) { float x1 = 0 ; float y1 = 0 ; float a = 3 ; float b = - 4 ; float c = 2 ; equation_parabola ( x1 , y1 , a , b , c ) ; } }

Class/struct names: solution
C# program:
class GFG { static int __gcd ( int a , int b ) { if ( b == 0 ) return a ; return __gcd ( b , a % b ) ; } static int countRectangles ( int l , int w ) { int squareSide = __gcd ( l , w ) ; return ( l * w ) / ( squareSide * squareSide ) ; } public static void Main ( ) { int l = 4 , w = 6 ; System . Console . WriteLine ( countRectangles ( l , w ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { public static void circle_equation ( double x1 , double y1 , double r ) { double a = - 2 * x1 ; double b = - 2 * y1 ; double c = ( r * r ) - ( x1 * x1 ) - ( y1 * y1 ) ; Console . Write ( " x ^ 2 ▁ + ▁ ( " + a + " ▁ x ) ▁ + ▁ " ) ; Console . Write ( " y ^ 2 ▁ + ▁ ( " + b + " ▁ y ) ▁ = ▁ " ) ; Console . WriteLine ( c + " . " ) ; } public static void Main ( string [ ] arr ) { double x1 = 2 , y1 = - 3 , r = 8 ; circle_equation ( x1 , y1 , r ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float area ( float r ) { return ( float ) ( ( 0.5 ) * ( 3.14 ) * ( r * r ) ) ; } static float perimeter ( float r ) { return ( float ) ( ( 3.14 ) * ( r ) ) ; } public static void Main ( ) { float r = 10 ; Console . WriteLine ( " The ▁ Area ▁ of ▁ Semicircle : ▁ " + area ( r ) ) ; Console . WriteLine ( " The ▁ Perimeter ▁ of ▁ Semicircle : " + perimeter ( r ) ) ; } }

Class/struct names: GFG
C# program:
class GFG { static bool checkEquilibrium ( int x1 , int y1 , int z1 , int x2 , int y2 , int z2 , int x3 , int y3 , int z3 ) { int resx = x1 + x2 + x3 ; int resy = y1 + y2 + y3 ; int resz = z1 + z2 + z3 ; if ( resx == 0 & resy == 0 & resz == 0 ) return true ; else return false ; } public static void Main ( ) { int x1 = - 2 , y1 = - 7 , z1 = - 9 , x2 = 5 , y2 = - 14 , z2 = 14 , x3 = - 3 , y3 = 21 , z3 = - 5 ; if ( checkEquilibrium ( x1 , y1 , z1 , x2 , y2 , z2 , x3 , y3 , z3 ) ) System . Console . WriteLine ( " The ▁ vectors ▁ are ▁ " + " at ▁ equilibrium . " ) ; else System . Console . WriteLine ( " The ▁ vectors ▁ are ▁ not ▁ " + " at ▁ equilibrium . " ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void findTangent ( int A , int x , int y ) { int dif = A - x * 2 ; if ( y == ( 2 * x - x * x ) ) { if ( dif < 0 ) Console . Write ( " y ▁ = ▁ " + dif + " x " + ( x * dif + y ) + " STRNEWLINE " ) ; else if ( dif > 0 ) Console . Write ( " y ▁ = ▁ " + dif + " x + " + - x * dif + y + " STRNEWLINE " ) ; else Console . Write ( " Not ▁ possible " + " STRNEWLINE " ) ; } } public static void Main ( ) { int A = 2 , x = 2 , y = 0 ; findTangent ( A , x , y ) ; } }

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

Class/struct names: GFG
C# program:
using System ; class GFG { static double octaside ( double a ) { if ( a < 0 ) return - 1 ; double s = a / ( Math . Sqrt ( 2 ) + 1 ) ; return s ; } static public void Main ( ) { double a = 4 ; Console . WriteLine ( octaside ( a ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { public class node { public long x , y , r ; } ; static long dis ( long x1 , long y1 , long x2 , long y2 ) { return ( long ) Math . Sqrt ( ( x1 - x2 ) * ( x1 - x2 ) + ( y1 - y2 ) * ( y1 - y2 ) ) ; } static Boolean check ( node c1 , node c2 , int k ) { long min = 0 ; long max = 0 ; long de = dis ( c1 . x , c1 . y , c2 . x , c2 . y ) ; if ( de == 0 ) { if ( c1 . r == c2 . r ) { min = 0 ; max = 0 ; } else if ( c1 . r - c2 . r > 0 ) { min = c1 . r - c2 . r ; max = min + 2 * c2 . r ; } else { min = c2 . r - c1 . r ; max = min + 2 * c1 . r ; } } else if ( de >= c1 . r + c2 . r ) { min = de - c1 . r - c2 . r ; max = de + c1 . r + c2 . r ; } else if ( de + c2 . r < c1 . r ) { max = c2 . r + c1 . r + de ; min = c1 . r - de - c2 . r ; } else if ( de + c1 . r < c2 . r ) { max = c2 . r + c1 . r + de ; min = c2 . r - de - c1 . r ; } else if ( ( de + c2 . r >= c1 . r ) || ( de + c1 . r >= c2 . r ) ) { max = c2 . r + c1 . r + de ; min = 0 ; } long temin = ( long ) ( Math . Ceiling ( ( double ) min ) ) ; long re = ( long ) max ; if ( k >= temin && k <= re ) { return true ; } return false ; } public static void Main ( String [ ] args ) { node circle1 = new node ( ) ; node circle2 = new node ( ) ; int k = 3 ; circle1 . x = 0 ; circle1 . y = 0 ; circle1 . r = 5 ; circle2 . x = 8 ; circle2 . y = 3 ; circle2 . r = 2 ; if ( check ( circle1 , circle2 , k ) ) { Console . WriteLine ( " Yes " ) ; } else { Console . WriteLine ( " No " ) ; } } }

Class/struct names: GFG, node
C# program:
using System ; class GFG { static bool Arrive ( int a , int b , int n ) { if ( n >= Math . Abs ( a ) + Math . Abs ( b ) && ( n - ( Math . Abs ( a ) + Math . Abs ( b ) ) ) % 2 == 0 ) return true ; return false ; } public static void Main ( ) { int a = 5 , b = 5 , n = 11 ; if ( Arrive ( a , b , n ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static bool Move ( int a , int x , int b ) { if ( ( ( ( b - a ) % x == 0 ) || ( ( b - a - 1 ) % x == 0 ) && a + 1 != b ) && b >= a ) return true ; return false ; } public static void Main ( ) { int a = 3 , x = 2 , b = 7 ; if ( Move ( a , x , b ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }

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

Class/struct names: GFG
C# program:
using System ; class GFG { static float findRadiusOfcircumcircle ( float l , float b ) { if ( l < 0 b < 0 ) return - 1 ; float radius = ( float ) Math . Sqrt ( Math . Pow ( l , 2 ) + Math . Pow ( b , 2 ) ) / 2 ; return radius ; } public static void Main ( ) { float l = 4 , b = 3 ; Console . WriteLine ( findRadiusOfcircumcircle ( l , b ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class gfg { public double circlearea ( double a , double b , double c ) { if ( a < 0 b < 0 c < 0 ) return - 1 ; double p = ( a + b + c ) / 2 ; double At = Math . Sqrt ( p * ( p - a ) * ( p - b ) * ( p - c ) ) ; double A = 3.14 * Math . Pow ( ( ( a * b * c ) / ( 4 * At ) ) , 2 ) ; return A ; } } class geek { public static int Main ( ) { gfg g = new gfg ( ) ; double a = 4 , b = 5 , c = 3 ; Console . WriteLine ( g . circlearea ( a , b , c ) ) ; return 0 ; } }

Class/struct names: geek, gfg
C# program:
using System ; class GFG { static float altitude ( float a , float b ) { return ( float ) ( Math . Sqrt ( Math . Pow ( a , 2 ) - ( Math . Pow ( b , 2 ) / 4 ) ) ) ; } static float area ( float b , float h ) { return ( 1 * b * h ) / 2 ; } public static void Main ( ) { float a = 2 , b = 3 ; float h = altitude ( a , b ) ; Console . WriteLine ( " Altitude ▁ = ▁ " + h + " , ▁ " ) ; Console . WriteLine ( " Area ▁ = ▁ " + area ( b , h ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int surfaceArea ( int b , int s ) { return 2 * b * s + ( int ) Math . Pow ( b , 2 ) ; } public static void Main ( ) { int b = 3 , s = 4 ; Console . WriteLine ( surfaceArea ( b , s ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float trianglearea ( float l , float b ) { if ( l < 0 b < 0 ) return - 1 ; float area = ( l * b ) / 2 ; return area ; } public static void Main ( ) { float l = 5 , b = 4 ; Console . WriteLine ( trianglearea ( l , b ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static void halfsquare ( int n , int x , int y ) { int half = n / 2 ; if ( ( half == x half == x - 1 ) && ( half == y half == y - 1 ) ) Console . WriteLine ( " NO " ) ; else Console . WriteLine ( " YES " ) ; } public static void Main ( ) { int n = 100 ; int x = 51 , y = 100 ; halfsquare ( n , x , y ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static bool check ( long a , long b , long p , long q ) { long d = p * p + q * q ; if ( d == 0 ) return a == 0 && b == 0 ; else return ( a * p + b * q ) % d == 0 && ( b * p - a * q ) % d == 0 ; } static bool check ( int a , int b , int x , int y , int p , int q ) { if ( check ( a - x , b - y , p , q ) || check ( a + x , b + y , p , q ) || check ( a - y , b + x , p , q ) || check ( a + y , b - x , p , q ) ) return true ; else return false ; } public static void Main ( ) { int a = - 4 , b = - 2 ; int x = 0 , y = 0 ; int p = - 2 , q = - 1 ; if ( check ( a , b , x , y , p , q ) ) Console . Write ( " Yes " ) ; else Console . Write ( " No " ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float trianglearea ( float a , float b ) { if ( a < 0 b < 0 ) return - 1 ; float area = ( float ) ( 3 * Math . Sqrt ( 3 ) * Math . Pow ( a , 2 ) ) / ( 4 * b ) ; return area ; } public static void Main ( ) { float a = 4 , b = 2 ; Console . WriteLine ( trianglearea ( a , b ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float squarearea ( float a , float b ) { if ( a < 0 b < 0 ) return - 1 ; float area = 4 * ( float ) ( ( Math . Pow ( a , 2 ) + Math . Pow ( b , 2 ) ) / ( Math . Pow ( a , 2 ) * Math . Pow ( b , 2 ) ) ) ; return area ; } public static void Main ( ) { float a = 4 , b = 2 ; Console . WriteLine ( squarearea ( a , b ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float trianglearea ( float r ) { if ( r < 0 ) return - 1 ; return r * r ; } public static void Main ( ) { float r = 5 ; Console . Write ( trianglearea ( r ) ) ; } }

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

Class/struct names: GFG
C# program:
using System ; class GFG { static float rectanglearea ( float a , float b ) { if ( a < 0 b < 0 ) return - 1 ; return 2 * a * b ; } public static void Main ( ) { float a = 10 , b = 8 ; Console . WriteLine ( rectanglearea ( a , b ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static float squareArea ( float l , float b , float h ) { if ( l < 0 b < 0 h < 0 ) return - 1 ; float a = ( l * b ) / ( l + b ) ; return a * a ; } public static void Main ( ) { float l = 5 , b = 12 , h = 13 ; Console . WriteLine ( squareArea ( l , b , h ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int MAX = 50 ; static void solveQuery ( int n , int q , int [ ] qi , int [ ] qj ) { int [ ] arr = new int [ MAX ] ; for ( int i = 0 ; i <= n ; i ++ ) arr [ i ] = 0 ; for ( int k = 0 ; k < q ; k ++ ) { int flag = 0 ; if ( qj [ k ] < qi [ k ] ) { int temp = qi [ k ] ; qi [ k ] = qj [ k ] ; qj [ k ] = temp ; } if ( arr [ qi [ k ] ] != 0 arr [ qj [ k ] ] != 0 ) flag = 1 ; else if ( qi [ k ] == qj [ k ] ) flag = 1 ; else { for ( int i = 1 ; i < qi [ k ] ; i ++ ) { if ( arr [ i ] != 0 && arr [ i ] < qj [ k ] && qi [ k ] < arr [ i ] ) { flag = 1 ; break ; } } if ( flag == 0 ) { for ( int i = qi [ k ] + 1 ; i < qj [ k ] ; i ++ ) { if ( arr [ i ] != 0 && arr [ i ] > qj [ k ] ) { flag = 1 ; break ; } } } } if ( flag == 0 ) { Console . Write ( " YES STRNEWLINE " ) ; arr [ qi [ k ] ] = qj [ k ] ; arr [ qj [ k ] ] = qi [ k ] ; } else Console . Write ( " NO STRNEWLINE " ) ; } } public static void Main ( ) { int n = 10 ; int q = 7 ; int [ ] qi = { 1 , 2 , 2 , 2 , 9 , 10 , 8 } ; int [ ] qj = { 5 , 7 , 3 , 4 , 9 , 9 , 6 } ; solveQuery ( n , q , qi , qj ) ; } }

Index/key variables: MAX, i, k
Accumulator variables: i, k
Iterator variables: i, k
Class/struct names: GFG
C# program:
using System ; class GFG { static int squares ( int l , int b , int a ) { return ( int ) ( Math . Ceiling ( l / ( double ) a ) * Math . Ceiling ( b / ( double ) a ) ) ; } public static void Main ( ) { int l = 11 , b = 23 , a = 14 ; Console . Write ( squares ( l , b , a ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static int gcd ( int a , int b ) { if ( a == 0 b == 0 ) return 0 ; if ( a == b ) return a ; if ( a > b ) return gcd ( a - b , b ) ; return gcd ( a , b - a ) ; } static int squarearea ( int l , int b ) { if ( l < 0 b < 0 ) return - 1 ; int n = ( l * b ) / gcd ( l , b ) ; return n * n ; } public static void Main ( ) { int l = 6 , b = 4 ; Console . Write ( squarearea ( l , b ) ) ; } }

Class/struct names: GFG
C# program:
using System ; class GFG { static double angle_triangle ( int x1 , int x2 , int x3 , int y1 , int y2 , int y3 , int z1 , int z2 , int z3 ) { int num = ( x2 - x1 ) * ( x3 - x1 ) + ( y2 - y1 ) * ( y3 - y1 ) + ( z2 - z1 ) * ( z3 - z1 ) ; double den = Math . Sqrt ( Math . Pow ( ( x2 - x1 ) , 2 ) + Math . Pow ( ( y2 - y1 ) , 2 ) + Math . Pow ( ( z2 - z1 ) , 2 ) ) * Math . Sqrt ( Math . Pow ( ( x3 - x1 ) , 2 ) + Math . Pow ( ( y3 - y1 ) , 2 ) + Math . Pow ( ( z3 - z1 ) , 2 ) ) ; double angle = Math . Acos ( num / den ) * ( 180.0 / 3.141592653589793238463 ) ; return angle ; } public static void Main ( ) { int x1 = - 1 , y1 = 3 , z1 = 2 ; int x2 = 2 , y2 = 3 , z2 = 5 ; int x3 = 3 , y3 = 5 , z3 = - 2 ; double angle_A = angle_triangle ( x1 , x2 , x3 , y1 , y2 , y3 , z1 , z2 , z3 ) ; double angle_B = angle_triangle ( x2 , x3 , x1 , y2 , y3 , y1 , z2 , z3 , z1 ) ; double angle_C = angle_triangle ( x3 , x2 , x1 , y3 , y2 , y1 , z3 , z2 , z1 ) ; Console . WriteLine ( " Angles ▁ are ▁ : " ) ; Console . WriteLine ( " angle ▁ A ▁ = ▁ " + angle_A + " ▁ degree " ) ; Console . WriteLine ( " angle ▁ B ▁ = ▁ " + angle_B + " ▁ degree " ) ; Console . WriteLine ( " angle ▁ C ▁ = ▁ " + angle_C + " ▁ degree " ) ; } }

Class/struct names: GFG