Program to compare m ^ n and n ^ m | C # program to compare which is greater m ^ n or n ^ m ; function to compare m ^ n and n ^ m ; m ^ n ; n ^ m ; Driver Code ; function call to compare m ^ n and n ^ m
using System ; class GFG { static void check ( ulong m , ulong n ) { double RHS = m * ( double ) Math . Log ( n ) ; double LHS = n * ( double ) Math . Log ( m ) ; if ( LHS > RHS ) Console . Write ( " m ^ n ▁ > ▁ n ^ m " ) ; else if ( LHS < RHS ) Console . Write ( " m ^ n ▁ < ▁ n ^ m " ) ; else Console . Write ( " m ^ n ▁ = ▁ n ^ m " ) ; } static public void Main ( ) { ulong m = 987654321 , n = 123456987 ; check ( m , n ) ; } }