Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- for i := 0; i < 1000; i++ {
- if i % 10 == 7 {
- fmt.Println(i)
- }
- }
- }
- Оптимизирано решение:
- package main
- import "fmt"
- func main() {
- for i := 7; i <= 997; i += 10 {
- fmt.Println(i)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement