Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import "fmt"
- func main() {
- var age float32
- fmt.Scanln(&age)
- var gender string
- fmt.Scanln(&gender)
- if (gender == "m") {
- if (age < 16) {
- fmt.Println("Master")
- } else {
- fmt.Println("Mr.")
- }
- } else {
- if (age < 16) {
- fmt.Println("Miss")
- } else {
- fmt.Println("Ms.")
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement