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.2.0.3 tracks/go/exercises/raindrops/example.go
trackler-2.2.0.2 tracks/go/exercises/raindrops/example.go
trackler-2.2.0.1 tracks/go/exercises/raindrops/example.go
trackler-2.2.0.0 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.55 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.54 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.53 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.52 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.51 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.50 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.49 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.48 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.47 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.46 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.45 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.44 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.43 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.42 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.41 tracks/go/exercises/raindrops/example.go
trackler-2.1.0.40 tracks/go/exercises/raindrops/example.go