Complete the code to print numbers from 1 to 5 using a for loop.
for i := 1; i [1] 5; i++ { fmt.Println(i) }
The loop should run while i is less than or equal to 5 to print numbers 1 through 5.
Complete the code to sum numbers from 1 to 10 using a for loop.
sum := 0 for i := 1; i [1] 10; i++ { sum += i } fmt.Println(sum)
The loop must include 10, so the condition should be i <= 10.
Fix the error in the loop condition to print even numbers from 2 to 10.
for i := 2; i [1] 10; i += 2 { fmt.Println(i) }
The loop should continue while i is less than or equal to 10 to include 10.
Fill both blanks to create a loop that prints numbers from 10 down to 1.
for i := 10; i [1] 1; i[2] { fmt.Println(i) }
The loop should run while i is greater than or equal to 1, and decrement i each time using --.
Fill all three blanks to create a loop that prints only odd numbers from 1 to 9.
for i := [1]; i [2] 9; i [3] { fmt.Println(i) }
The loop starts at 1, runs while i is less than or equal to 9, and increments i by 2 to get odd numbers.