17 lines
230 B
Go
17 lines
230 B
Go
package size
|
|
|
|
func Size(a int) string {
|
|
switch {
|
|
case a < 0:
|
|
return "negative"
|
|
case a == 0:
|
|
return "zero"
|
|
case a < 10:
|
|
return "small"
|
|
case a < 100:
|
|
return "big"
|
|
case a < 1000:
|
|
return "huge"
|
|
}
|
|
return "enormous"
|
|
}
|