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.58 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.57 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.56 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.55 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.54 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.53 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.52 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.51 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.50 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.49 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.48 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.47 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.46 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.45 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.44 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.43 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.42 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.41 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.40 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.39 tracks/nim/exercises/raindrops/example.nim