Kodewick
Start learning →
Basic←→0 / 70

Cup size

#013BasicConditions3 min

The drinks stand names its cups by size: up to 350 ml is "small", up to 500 ml is "medium", anything more is "large". Write CupSize(ml) to return the name (exactly 350 is small, exactly 500 is medium).

Examples
CupSize(300)→'small'
CupSize(450)→'medium'
CupSize(700)→'large'
The functionfunc CupSize(ml int) string
main.go
package main

func CupSize(ml int) string {
	size := ""
	// your code here: if, else if, else to pick size
	return size
}
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.