increasingPuzzle.frink

View or download increasingPuzzle.frink in plain text format


ascending = 0
count = 0
a = array[1 to 10]
for c = a.combinations[5]
{
   count = count + 1
   if sort[c.shallowCopy[]] == c
      ascending = ascending + 1
}

println["$ascending / $count are increasing." + (ascending/count)]

   


View or download increasingPuzzle.frink in plain text format


This is a program written in the programming language Frink.
For more information, view the Frink Documentation or see More Sample Frink Programs.

Alan Eliasen was born 17777 days, 2 hours, 7 minutes ago.