Advertisement
Spocoman

03. Numbers 1...N with Step 3

Sep 19th, 2024
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.16 KB | None | 0 0
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.     var number int
  7.     fmt.Scanln(&number)
  8.    
  9.     for i := 1; i <= number; i += 3 {
  10.         fmt.Println(i)
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement