Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var n, m, s int
- fmt.Scanln(&n)
- fmt.Scanln(&m)
- fmt.Scanln(&s)
- for i := m; i >= n; i-- {
- if i == s && s % 2 == 0 && s % 3 == 0 {
- break
- } else if i % 2 == 0 && i % 3 == 0 {
- fmt.Printf("%d ", i)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement