You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This is a simple program that shows how to use go in taking inputs from a console... It takes in name and age as inputs and then uses conditionals to see if the age is permitted to continue
package main
import"fmt"
funcmain() {
fmt.Printf("What's your name? : ")
varnamestring
fmt.Scanln(&name)
fmt.Printf("How old are you? : ")
varageint
fmt.Scanln(&age)
ifage<18 {
fmt.Println(name, "You are too young to continue! ")