Find N distinct integers with zero sum | C # implementation to print N distinct numbers such that their sum is 0 ; Function to print distinct n numbers such that their sum is 0 ; Print 2 symmetric numbers ; Print a extra 0 if N is odd ; Driver code
using System ; class GFG { static void findNumbers ( int N ) { for ( int i = 1 ; i <= ( N / 2 ) ; i ++ ) { Console . Write ( i + " , ▁ " + - i + " , ▁ " ) ; } if ( N % 2 == 1 ) Console . Write ( 0 ) ; } static void Main ( ) { int N = 10 ; findNumbers ( N ) ; } }