Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 649 Bytes

6.06.md

File metadata and controls

25 lines (17 loc) · 649 Bytes

Section 6.06 Loop - Printing ASCII

Mini Hands-On Exercise

We previously learned how to print the different characters of a string with format printing. Refer to the docmentation for a refresher on the fmt package.

Loop through the numbers 33 through 122, and print them out as numbers and text strings.

Hint: Refer to the ASCII coding scheme to see the decimal and glyph representations.

package main

import (
	"fmt"
)

func main() {
	for i := 33; i < 122; i++ {
		fmt.Printf("%v\t%#U\n", i, i)
	}
}

playground