Diagonal of a Regular Decagon | C # program to find the diagonal of a regular decdiagonal ; Function to return the diagonal of a regular decdiagonal ; side cannot be negative ; length of the diagonal ; Driver code
using System ; public class GFG { static double decdiagonal ( double a ) { if ( a < 0 ) return - 1 ; double d = 1.902 * a ; return d ; } public static void Main ( ) { int a = 9 ; Console . WriteLine ( decdiagonal ( a ) ) ; } }