Area of a square from diagonal length | C ++ Program to find the area of square when its diagonal is given . ; Returns area of square from given diagonal ; Driver Code
#include <bits/stdc++.h> NEW_LINE using namespace std ; double findArea ( double d ) { return ( d * d ) / 2.0 ; } int main ( ) { double d = 10 ; cout << ( findArea ( d ) ) ; return 0 ; }