Program to calculate length of diagonal of a square | C # program for the above approach ; Function to find the length of the diagonal of a square of a given side ; Driver Code
using System ; public class GFG { static double findDiagonal ( double s ) { return ( double ) Math . Sqrt ( 2 ) * s ; } public static void Main ( String [ ] args ) { double S = 10 ; Console . Write ( findDiagonal ( S ) ) ; } }