Run ❯
Get your own website
×
Change Orientation
prog.go
Input
package main import ("fmt") func main() { var i,j int fmt.Print("Type two numbers: ") fmt.Scanf("%v\n%v",&i, &j) fmt.Println("Your numbers are:", i, "and", j) }
// These are the input values you give to the program. // The program is looking for two inputs in two separate lines. This is because of \n // So, 1 2 in two lines gives you 1 2. If 1 2 are in one line, the result is 1 0. 1 2
Your numbers are: 1 and 2