Check if a large number is divisible by 25 or not | Function to find that number divisible by 25 or not ; If length of string is single digit then it 's not divisible by 25 ; Driver Code
function isDivisibleBy25 ( str ) { n = str . length ; if ( n == 1 ) return false ; return ( ( str [ n - 1 ] - ' ' == 0 && str [ n - 2 ] - ' ' == 0 ) || ( ( str [ n - 2 ] - ' ' ) * 10 + ( str [ n - 1 ] - ' ' ) ) % 25 == 0 ) ; } var str = " " ; var x = isDivisibleBy25 ( str ) ? " " : " " ; document . write ( x ) ;