Program to find last two digits of 2 ^ n | Find the first digit ; Get the last digit from the number ; Remove last digit from number ; Get the last digit from the number ( last second of num ) ; Take last digit to ten 's position  i.e. last second digit ; Add the value of ones and tens to make it complete 2 digit number ; return the first digit ; Driver program ; pow function used
function LastTwoDigit ( num ) { let one = num % 10 ; num = Math . floor ( num / 10 ) ; let tens = num % 10 ; tens *= 10 ; num = tens + one ; return num ; } let n = 10 ; let num = 1 ; num = Math . pow ( 2 , n ) ; document . write ( " " + 2 ) ; document . write ( " " + 2 ) ; document . write ( " " + n + " " ) ; document . write ( LastTwoDigit ( num ) + " " ) ;