Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var n int
- fmt.Scanln(&n)
- var k = 1
- for i:= 0; k <= n; i++ {
- fmt.Println(k)
- k = 2 * k + 1
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement