Check if a point is inside , outside or on the parabola | C # Program to check if the point lies within the parabola or not ; Function to check the point ; checking the equation of parabola with the given point ; Driver code
using System ; class GFG { public static int checkpoint ( int h , int k , int x , int y , int a ) { int p = ( int ) Math . Pow ( ( y - k ) , 2 ) - 4 * a * ( x - h ) ; return p ; } public static void Main ( string [ ] arr ) { int h = 0 , k = 0 , x = 2 , y = 1 , a = 4 ; if ( checkpoint ( h , k , x , y , a ) > 0 ) { Console . WriteLine ( " Outside " ) ; } else if ( checkpoint ( h , k , x , y , a ) == 0 ) { Console . WriteLine ( " On ▁ the ▁ parabola " ) ; } else { Console . WriteLine ( " Inside " ) ; } } }