Find the Next perfect square greater than a given number | C # implementation of above approach ; Function to find the next perfect square ; Driver Code
using System ; class GFG { static int nextPerfectSquare ( int N ) { int nextN = ( int ) Math . Floor ( Math . Sqrt ( N ) ) + 1 ; return nextN * nextN ; } public static void Main ( ) { int n = 35 ; Console . WriteLine ( nextPerfectSquare ( n ) ) ; } }