Program to print non square numbers | C # program to print first n non - square numbers . ; Returns n - th non - square number . ; loop to print non squares below n ; Driver code
using System ; class GFG { static int nonsquare ( int n ) { return n + ( int ) ( 0.5 + ( Math . Sqrt ( n ) ) ) ; } static void printNonSquare ( int n ) { for ( int i = 1 ; i <= n ; i ++ ) Console . Write ( nonsquare ( i ) + " ▁ " ) ; } public static void Main ( ) { int n = 10 ; printNonSquare ( n ) ; } }