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.78 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.77 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.76 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.75 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.74 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.73 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.72 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.71 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.70 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.69 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.68 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.67 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.66 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.65 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.64 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.63 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.62 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.61 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.60 tracks/nim/exercises/raindrops/example.nim
trackler-2.2.1.59 tracks/nim/exercises/raindrops/example.nim