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: #include <iostream> NEW_LINE using namespace std ; int areaOfSquare ( int S ) { int area = S * S ; return area ; } int main ( ) { int S = 5 ; cout << areaOfSquare ( S ) ; return 0 ; }