text: Check whether the given floating point number is a palindrome | C # implementation of the approach ; Function that returns true if num is palindrome ; Convert the given floating point number into a string ; Pointers pointing to the first and the last character of the string ; Not a palindrome ; Update the pointers ; Driver code
code: using System ; class GFG { public static bool isPalindrome ( float num ) { string s = num . ToString ( ) ; int low = 0 ; int high = s . Length - 1 ; while ( low < high ) { if ( s [ low ] != s [ high ] ) return false ; low ++ ; high -- ; } return true ; } public static void Main ( ) { float n = 123.321f ; if ( isPalindrome ( n ) ) Console . WriteLine ( " Yes " ) ; else Console . WriteLine ( " No " ) ; } }