mirror of https://github.com/01-edu/public.git
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.
22 lines
301 B
22 lines
301 B
5 years ago
|
package main
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
func main() {
|
||
|
for a := 9; a >= 2; {
|
||
|
for b := a - 1; b >= 1; {
|
||
|
for c := b - 1; c >= 0; {
|
||
5 years ago
|
if a > b && b > c && a+b+c != 3 {
|
||
5 years ago
|
fmt.Printf("%d%d%d, ", a, b, c)
|
||
|
}
|
||
5 years ago
|
if a+b+c == 3 {
|
||
5 years ago
|
fmt.Printf("%d%d%d\n", a, b, c)
|
||
|
}
|
||
|
c--
|
||
|
}
|
||
|
b--
|
||
|
}
|
||
|
a--
|
||
|
}
|
||
|
}
|