Printing a slice

Report a typo

Suppose you have a program with a predefined slice of integers intSlice that contains three variables num1, num2, and num3.

Your task is to print all the intSlice elements multiplied by two, each on a new line.

Sample Input 1:

1 2 3

Sample Output 1:

2
4
6
Write a program in Go
package main

import "fmt"

func main() {
// DO NOT delete or modify the code block below!
var num1, num2, num3 int
fmt.Scanln(&num1, &num2, &num3)
intSlice := []int{num1, num2, num3}

// Write the code to multiply each element of `intSlice` by 2
// And then print each multiplied element on a new line here or below this comment:
}
___

Create a free account to access the full topic