Always A-HEAD, By being ahead you are always master of time

Hits

BOOKS

Tuesday, February 06, 2007

CoolOne with Powershell

Yesterday there was question in KBC , English version[Original] Who wants to be Millionaire, how many 9's are there from 1 to 100. Before they could answer I answered it quickly with Powershell. This is how

(1..100 where{$_ -like "*9*}).count

1 comment:

Anonymous said...

LOL, you typed it so fast, you had two typos ( a | and a ")! But a cool post nonetheless. :)

(1..100 | where {$_ -like "*9*"}).count