increasingPuzzle.frink

Download or view 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)]

   


Download or view 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 20217 days, 23 hours, 52 minutes ago.