Sha256: a5802d3ba23b697f246e6c4c3f20b218bdb9d8a614a82e2f7e1756545424f7a1

Contents?: true

Size: 277 Bytes

Versions: 117

Compression:

Stored size: 277 Bytes

Contents

package raindrops

import "strconv"

const testVersion = 3

func Convert(number int) string {
	s := ""
	if number%3 == 0 {
		s += "Pling"
	}
	if number%5 == 0 {
		s += "Plang"
	}
	if number%7 == 0 {
		s += "Plong"
	}
	if len(s) == 0 {
		s = strconv.Itoa(number)
	}
	return s
}

Version data entries

117 entries across 117 versions & 1 rubygems

Version Path
trackler-2.1.0.39 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.38 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.37 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.36 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.34 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.33 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.32 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.31 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.30 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.29 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.28 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.27 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.26 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.25 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.24 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.23 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.22 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.21 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.20 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.19 tracks/go/exercises/raindrops/example.go