dhyuti-n/xlcost-variable-roles huggingface dataset:
Java program:
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 ( String [ ] args ) { float a = 5 ; System . out . println ( String . format ( " % .5f " , Area ( a ) ) ) ; } }

Class/struct names: GFG
Java program:
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 ( String [ ] args ) { double side = 4 , fold = 2 ; System . out . println ( areaSquare ( side , fold ) ) ; } }

Class/struct names: GFG
Java program:
import java . util . * ; 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 ( String args [ ] ) { double r = 6 ; System . out . println ( ReuleauxArea ( r ) ) ; } }

Class/struct names: GFG
Java program:
import java . lang . Math ; class cfg { 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 ( String [ ] args ) { float a = 5 ; System . out . println ( cyl ( a ) ) ; } }

Class/struct names: cfg
Java program:
import java . util . * ; import java . text . DecimalFormat ; 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 ( String args [ ] ) { double l = 5 , b = 12 , h = 13 ; DecimalFormat df = new DecimalFormat ( " # , # # # , # #0.00000" ) ; System . out . println ( df . format ( Area ( l , b , h ) ) ) ; } }

Class/struct names: GFG
Java program:
class cfg { static float squareSide ( float a ) { if ( a < 0 ) return - 1 ; float x = ( 0.423f * a ) ; return x ; } public static void main ( String [ ] args ) { float a = 8 ; System . out . println ( squareSide ( a ) ) ; } }

Class/struct names: cfg
Java program:
import java . util . * ; class GFG { static boolean isPossible ( float x , float y , float z ) { float a = x * x + y * y + z * z ; if ( Math . ceil ( a ) == 1 && Math . floor ( a ) == 1 ) return true ; return false ; } public static void main ( String args [ ] ) { float l = 0.70710678f , m = 0.5f , n = 0.5f ; if ( isPossible ( l , m , n ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }

Class/struct names: GFG
Java program:
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 ) ) ; } public static void main ( String [ ] args ) { float a = 9 , n = 10 ; System . out . printf ( " % .3f " , polydiagonal ( n , a ) ) ; } }

Class/struct names: GFG
Java program:
import java . util . * ; import java . lang . * ; import java . io . * ; public class GFG { static double decdiagonal ( double a ) { if ( a < 0 ) return - 1 ; double d = 1.902 * a ; return d ; } public static void main ( String [ ] args ) { int a = 9 ; System . out . println ( decdiagonal ( a ) ) ; } }

Class/struct names: GFG
Java program:
import java . util . * ; import java . lang . * ; import java . io . * ; public class GFG { static double heptdiagonal ( double a ) { if ( a < 0 ) return - 1 ; double d = 1.802 * a ; return d ; } public static void main ( String [ ] args ) { int a = 6 ; System . out . println ( heptdiagonal ( a ) ) ; } }

Class/struct names: GFG
Java program:
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 ( String [ ] args ) { float a = 9 ; System . out . println ( hexDiagonal ( a ) ) ; } }

Class/struct names: GFG
Java program:
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 ( String args [ ] ) { float a = 6 ; System . out . println ( ReuleauxArea ( a ) ) ; } }

Class/struct names: GFG
Java program:
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 ( String args [ ] ) { float a = 6 ; System . out . println ( squareArea ( a ) ) ; } }

Class/struct names: Solution
Java program:
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 ( String [ ] args ) { float d = 5 ; System . out . println ( " Volume ▁ of ▁ Cube : ▁ " + CubeVolume ( d ) ) ; } }

Class/struct names: GFG
Java program:
import java . lang . * ; 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 ( String [ ] args ) { double a = 7 , b = 8 , s = 10 ; System . out . println ( per ( a , b ) ) ; System . out . println ( area ( s ) ) ; } }

Class/struct names: GFG
Java program:
import java . lang . * ; class GFG { static double PI = 3.14159265 ; public static double area_leaf ( double a ) { return ( a * a * ( PI / 2 - 1 ) ) ; } public static void main ( String [ ] args ) { double a = 7 ; System . out . println ( area_leaf ( a ) ) ; } }

Class/struct names: GFG
Java program:
import java . lang . * ; class GFG { static double PI = 3.14159265 ; public static double length_rope ( double r ) { return ( ( 2 * PI * r ) + 6 * r ) ; } public static void main ( String [ ] args ) { double r = 7 ; System . out . println ( length_rope ( r ) ) ; } }

Class/struct names: GFG
Java program:
import java . lang . * ; 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 ( String [ ] args ) { double P = 3 , B = 4 , H = 5 ; System . out . println ( area_inscribed ( P , B , H ) ) ; } }

Class/struct names: GFG
Java program:
import java . lang . * ; class GFG { static double PI = 3.14159265 ; public static double area_cicumscribed ( double c ) { return ( c * c * ( PI / 4 ) ) ; } public static void main ( String [ ] args ) { double c = 8.0 ; System . out . println ( area_cicumscribed ( c ) ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; 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 ; } public static void main ( String [ ] args ) { double r = 4 , h = 8 ; System . out . println ( cyl ( r , h ) ) ; } }

Class/struct names: GFG
Java program:
class Solution { 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 ( String args [ ] ) { float h = 5 , r = 4 ; System . out . println ( cube ( h , r ) ) ; } }

Class/struct names: Solution
Java program:
import java . io . * ; 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 ( String [ ] args ) { float r = 4 , h = 8 ; System . out . println ( sph ( r , h ) ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; 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 ( String [ ] args ) { float R = 4 ; System . out . print ( cyl ( R ) ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; 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 ( String [ ] args ) { float h = 4 ; float r = 1.5f ; System . out . print ( rod ( h , r ) ) ; } }

Class/struct names: GFG
Java program:
import java . lang . * ; 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 ( String [ ] args ) { double a = 6.0 ; System . out . println ( " Area ▁ of ▁ inscribed ▁ circle ▁ is ▁ : " + area_inscribed ( a ) ) ; System . out . println ( " Perimeter of inscribed circle is : " + perm_inscribed ( a ) ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; 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 ( String [ ] args ) { float h = 5 , r = 6 ; System . out . println ( cube ( h , r ) ) ; } }

Class/struct names: GFG
Java program:
import java . util . * ; import java . lang . * ; 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 ( String args [ ] ) { float R = 10 ; System . out . println ( " r ▁ = ▁ " + coner ( R ) + " , ▁ " + " h ▁ = ▁ " + coneh ( R ) ) ; } }

Class/struct names: GFG
Java program:
import java . util . * ; import java . lang . * ; 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 ( String args [ ] ) { float a = 6 ; System . out . println ( " r ▁ = ▁ " + coneRadius ( a ) + " , ▁ " + " h ▁ = ▁ " + coneHeight ( a ) ) ; } }

Class/struct names: GFG
Java program:
import java . util . * ; class Solution { static float largestCube ( float r ) { if ( r < 0 ) return - 1 ; float a = ( 2 * r ) / ( float ) Math . sqrt ( 3 ) ; return a ; } public static void main ( String args [ ] ) { float r = 5 ; System . out . println ( largestCube ( r ) ) ; } }

Class/struct names: Solution
Java program:
class GFG { static float sphere ( float a ) { if ( a < 0 ) return - 1 ; float r = a / 2 ; return r ; } public static void main ( String [ ] args ) { float a = 5 ; System . out . println ( sphere ( a ) ) ; } }

Class/struct names: GFG
Java program:
class GFG { static int numberOfCuts ( int M , int N ) { int result = 0 ; result = ( M - 1 ) * ( N - 1 ) ; return result ; } public static void main ( String args [ ] ) { int M = 4 , N = 4 ; int Cuts = numberOfCuts ( M , N ) ; System . out . println ( " Maximum ▁ cuts ▁ = ▁ " + Cuts ) ; } }

Class/struct names: GFG
Java program:
import java . util . * ; class Geeks { 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 ( String args [ ] ) { float P = 20 , A = 16 ; System . out . println ( maxVol ( P , A ) ) ; } }

Class/struct names: Geeks
Java program:
import java . io . * ; 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 ) ) ) ; System . out . println ( " The ▁ area ▁ of ▁ rhombus ▁ with ▁ diagonals ▁ " + d1 + " ▁ and ▁ " + d2 + " ▁ is ▁ " + area + " . " ) ; System . out . println ( " The ▁ perimeter ▁ of ▁ rhombus ▁ with ▁ diagonals ▁ " + d1 + " ▁ and ▁ " + d2 + " ▁ is ▁ " + perimeter + " . " ) ; return 0 ; } public static void main ( String [ ] args ) { int d1 = 2 , d2 = 4 ; rhombusAreaPeri ( d1 , d2 ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static int maxArea ( float perimeter ) { int length = ( int ) Math . ceil ( perimeter / 4 ) ; int breadth = ( int ) Math . floor ( perimeter / 4 ) ; return length * breadth ; } public static void main ( String [ ] args ) { float n = 38 ; System . out . println ( " Maximum ▁ Area ▁ = ▁ " + maxArea ( n ) ) ; } }

Class/struct names: GFG
Java program:
import java . util . * ; import java . text . * ; class solution { 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 ; DecimalFormat form = new DecimalFormat ( "0.0" ) ; System . out . print ( " ▁ x2 ▁ = ▁ " + form . format ( x2 ) ) ; System . out . print ( " ▁ y2 ▁ = ▁ " + form . format ( y2 ) ) ; System . out . print ( " ▁ z2 ▁ = ▁ " + form . format ( z2 ) ) ; } 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: solution
Java program:
import java . util . * ; 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 ) ; System . out . println ( " equation ▁ of ▁ parabola ▁ is ▁ " + a1 + " ▁ x ^ 2 ▁ + ▁ " + b1 + " ▁ y ^ 2 ▁ + ▁ " + c1 + " ▁ x ▁ + ▁ " + d1 + " ▁ y ▁ + ▁ " + e1 + " ▁ xy ▁ + ▁ " + f1 + " ▁ = ▁ 0 . " ) ; } public static void main ( String arr [ ] ) { 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
Java 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 ( String [ ] args ) { int l = 4 , w = 6 ; System . out . println ( countRectangles ( l , w ) ) ; } }

Class/struct names: GFG
Java program:
import java . util . * ; class solution { 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 ) ; System . out . print ( " x ^ 2 ▁ + ▁ ( " + a + " ▁ x ) ▁ + ▁ " ) ; System . out . print ( " y ^ 2 ▁ + ▁ ( " + b + " ▁ y ) ▁ = ▁ " ) ; System . out . println ( c + " . " ) ; } public static void main ( String arr [ ] ) { double x1 = 2 , y1 = - 3 , r = 8 ; circle_equation ( x1 , y1 , r ) ; } }

Class/struct names: solution
Java program:
import java . io . * ; 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 ( String [ ] args ) { float r = 10 ; System . out . println ( " The ▁ Area ▁ of ▁ Semicircle : ▁ " + area ( r ) ) ; System . out . println ( " The ▁ Perimeter ▁ of ▁ Semicircle : " + + perimeter ( r ) ) ; } }

Class/struct names: GFG
Java program:
public class GFG { static boolean 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 ( String args [ ] ) { 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 . out . println ( " The ▁ vectors ▁ are ▁ at ▁ equilibrium . " ) ; else System . out . println ( " The ▁ vectors ▁ are ▁ not ▁ at ▁ equilibrium . " ) ; } }

Class/struct names: GFG
Java program:
import java . util . * ; import java . lang . * ; import java . io . * ; 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 ) System . out . println ( " y ▁ = ▁ " + dif + " x " + ( x * dif + y ) ) ; else if ( dif > 0 ) System . out . println ( " y ▁ = ▁ " + dif + " x + " + - x * dif + y ) ; else System . out . println ( " Not ▁ possible " ) ; } } public static void main ( String args [ ] ) { int A = 2 , x = 2 , y = 0 ; findTangent ( A , x , y ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static float hexadiagonal ( float a ) { if ( a < 0 ) return - 1 ; return 2 * a ; } public static void main ( String [ ] args ) { float a = 4 ; System . out . print ( hexadiagonal ( a ) ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static double octaside ( double a ) { if ( a < 0 ) return - 1 ; double s = a / ( Math . sqrt ( 2 ) + 1 ) ; return s ; } public static void main ( String [ ] args ) { double a = 4 ; System . out . println ( octaside ( a ) ) ; } }

Class/struct names: GFG
Java program:
class GFG { static class node { 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 . ceil ( 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 ) ) { System . out . println ( " Yes " ) ; } else { System . out . println ( " No " ) ; } } }

Class/struct names: GFG, node
Java program:
import java . io . * ; public class GFG { static boolean 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 ; } int main ( ) { return 0 ; } public static void main ( String [ ] args ) { int a = 5 , b = 5 , n = 11 ; if ( Arrive ( a , b , n ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static boolean 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 ( String [ ] args ) { int a = 3 , x = 2 , b = 7 ; if ( Move ( a , x , b ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static float area ( float a , float b ) { if ( a < 0 b < 0 ) return - 1 ; float A = a * b ; return A ; } public static void main ( String [ ] args ) { float a = 5 , b = 2 ; System . out . println ( area ( a , b ) ) ; } }

Class/struct names: GFG
Java program:
import java . util . * ; import java . lang . * ; import java . io . * ; 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 ( String args [ ] ) { float l = 4 , b = 3 ; System . out . println ( findRadiusOfcircumcircle ( l , b ) ) ; } }

Class/struct names: GFG
Java program:
import java . * ; 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 void main ( String [ ] args ) { gfg g = new gfg ( ) ; double a = 4 , b = 5 , c = 3 ; System . out . println ( g . circlearea ( a , b , c ) ) ; } }

Class/struct names: geek, gfg
Java program:
import java . io . * ; 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 ( String [ ] args ) { float a = 2 , b = 3 ; float h = altitude ( a , b ) ; System . out . print ( " Altitude = ▁ " + h + " , ▁ " ) ; System . out . print ( " Area = ▁ " + area ( b , h ) ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static int surfaceArea ( int b , int s ) { return 2 * b * s + ( int ) Math . pow ( b , 2 ) ; } public static void main ( String [ ] args ) { int b = 3 , s = 4 ; System . out . println ( surfaceArea ( b , s ) ) ; } }

Class/struct names: GFG
Java program:
import java . util . * ; 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 ( String args [ ] ) { float l = 5 , b = 4 ; System . out . println ( trianglearea ( l , b ) ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; 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 ) ) System . out . println ( " NO " ) ; else System . out . println ( " YES " ) ; } public static void main ( String [ ] args ) { int n = 100 ; int x = 51 , y = 100 ; halfsquare ( n , x , y ) ; } }

Class/struct names: GFG
Java program:
public class GFG { static boolean 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 boolean 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 ( String args [ ] ) { int a = - 4 , b = - 2 ; int x = 0 , y = 0 ; int p = - 2 , q = - 1 ; if ( check ( a , b , x , y , p , q ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }

Class/struct names: GFG
Java program:
public 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 ( String [ ] args ) { float a = 4 , b = 2 ; System . out . println ( trianglearea ( a , b ) ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; 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 ( String [ ] args ) { float a = 4 , b = 2 ; System . out . println ( squarearea ( a , b ) ) ; } }

Class/struct names: GFG
Java program:
import java . io . * ; class GFG { static float trianglearea ( float r ) { if ( r < 0 ) return - 1 ; return r * r ; } public static void main ( String [ ] args ) { float r = 5 ; System . out . println ( trianglearea ( r ) ) ; } }

Class/struct names: GFG