Without changing the order of the row of digits below find the unique three digit number with a 9\displaystyle {9} in the ones place and a 7\displaystyle {7} in the tens place. 

9,9,9,7,7,7,9\displaystyle {9},{9},{9},{7},{7},{7},{9} 

r=4

7=9
9=7
9=randfrom("9,7")
 
if (9==9){
  9=9
} elseif (9==7){
  9=randfrom("9,7")
}
 
{
9=randfrom("9,7")
} where (9+7!==2*7)
 
7=randfrom("9,7")