Sha256: c6f9559cc0288cbf3a892cb9069333927fd9945f469e977dca8dce2a43618373

Contents?: true

Size: 301 Bytes

Versions: 207

Compression:

Stored size: 301 Bytes

Contents

import strutils

proc convert*(sound: int): string =
  var raindrops = ""

  if (sound mod 3) == 0:
    raindrops.add("Pling")

  if (sound mod 5) == 0:
    raindrops.add("Plang")

  if (sound mod 7) == 0:
    raindrops.add("Plong")

  if len(raindrops) > 0:
    raindrops
  else:
    intToStr(sound)

Version data entries

207 entries across 207 versions & 1 rubygems

Version Path
trackler-2.2.1.18 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.17 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.16 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.15 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.14 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.13 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.12 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.11 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.10 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.9 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.8 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.7 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.6 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.5 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.4 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.3 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.2 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.1 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.0 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.0.6 tracks/nim/exercises/raindrops/example.nim