Find two numbers with difference and division both same as N | C # program for the above approach ; Function to find two numbers with difference and division both as N ; Condition if the answer is not possible ; Calculate a and b ; Print the values ; Driver Code ; Given N ; Function call
using System ; class GFG { static void findAandB ( double N ) { if ( N == 1 ) { Console . Write ( " No " ) ; return ; } double a = N * N / ( N - 1 ) ; double b = a / N ; Console . Write ( " a ▁ = ▁ " + a + " STRNEWLINE " ) ; Console . Write ( " b ▁ = ▁ " + b + " STRNEWLINE " ) ; } public static void Main ( String [ ] args ) { double N = 6 ; findAandB ( N ) ; } }