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