RosettaCodeData/Task/Character-codes/Go/character-codes-2.go

13 lines
235 B
Go
Raw Permalink Normal View History

2013-04-10 16:57:12 -07:00
package main
2020-02-17 23:21:07 -08:00
import (
"fmt"
)
2013-04-10 16:57:12 -07:00
func main() {
2020-02-17 23:21:07 -08:00
// Given a character value in your language, print its code
fmt.Printf("%d\n", 'A') // prt 65
// Given a code, print out the corresponding character.
fmt.Printf("%c\n", 65) // prt A
2013-04-10 16:57:12 -07:00
}