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