text: Area of a Square | Using Side , Diagonal and Perimeter | C # program for the above approach ; Function to find the area of a square ; Use above formula ; Driver Code ; Given Side of square ; Function call
code: using System ; class GFG { static int areaOfSquare ( int S ) { int area = S * S ; return area ; } public static void Main ( string [ ] args ) { int S = 5 ; Console . Write ( areaOfSquare ( S ) ) ; } }