We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52082c5 commit 6446e54Copy full SHA for 6446e54
nim/clockhands.nim
@@ -0,0 +1,8 @@
1
+import std/strformat
2
+
3
+for i in 0..10:
4
+ let t = (43200 * i + 21600) div 11
5
+ let h = t div 3600
6
+ let m = (t div 60) mod 60
7
+ let s = t mod 60
8
+ echo &"{(if h == 0: 12 else: h):02}:{m:02}:{s:02}"
nim/test.ps1
@@ -9,6 +9,9 @@ function Assert-MatchTests {
9
}
10
11
$Error.clear()
12
+nim c "$PSScriptRoot\clockhands.nim" && . "$PSScriptRoot\clockhands.exe" |
13
+ Compare-Object (Get-Content "$PSScriptRoot\..\test\clockhands_expected") |
14
+ Assert-MatchTests &&
15
nim c "$PSScriptRoot\permutations.nim" && . "$PSScriptRoot\permutations.exe" I like carrots |
16
Compare-Object (Get-Content "$PSScriptRoot\..\test\carrots_expected") |
17
Assert-MatchTests &&
0 commit comments