You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lavos/cap3/ex32.go

29 lines
362 B

5 months ago
package cap3
func Ex32() int {
for x := 1; x <= 4; x++ {
count := 0
if x != 1 {
count++
}
5 months ago
if x == 3 {
count++
}
5 months ago
if x == 4 {
count++
}
5 months ago
if x != 4 {
count++
}
5 months ago
if count == 3 {
return x
}
}
5 months ago
return 0
5 months ago
}