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.Scan(&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 separated with spaces. Newlines are also considered as spaces. // So, 1 2 in one line or 1 2 in separate lines gives you the same result. 1 2
Your numbers are: 1 and 2