Scripting Games 2008 Sudden Death Challenge Event 7
For Sudden death Event 7, I just post part of my history (get-history )
18 100 * 2
19 100 * 2 /30
20 [int](100 * 2 /30)
21 pow([int](100 * 2 /30),5)
22 [math]::pow([int](100 * 2 /30),5)
23 [math]::pow([int](100 * 2 /30),5) * 4
24 [math]::Sqrt([math]::pow([int](100 * 2 /30),5) * 4)
25 [math]::Sqrt([math]::pow([int](100 * 2 /30),5) * 4) / 45
26 "{0:2}" -f [math]::Sqrt([math]::pow([int](100 * 2 /30),5) * 4) / 45
27 "{0:N2}" -f [math]::Sqrt([math]::pow([int](100 * 2 /30),5) * 4) / 45
28 (new-object -com SAPI.SpVoice).speak("{0:N2}" -f ([math]::Sqrt([math]::pow([int](100 * 2 /30),5) * 4) / 45))
* Update * after seeing that I had scored a 0 for this event, it seems I did misread the question, and did ROUND the integer in step 3 instead of Truncating it, hence the correct solution should be :
(new-object -com SAPI.SpVoice).speak("{0:N2}" -f ([math]::Sqrt([math]::pow([math]::truncate(100 * 2 /30),5) * 4)/ 45))
Enjoy,
Greetings /\/\o\/\/