// Letters.swift Copyright (c) Kari Laitinen // http://www.naturalprogramming.com // 2014-10-01 File created. // 2016-08-11 Last modification. import Foundation func print_uppercase_letters() { print( "\n Uppercase English letters are: \n" ) // 0x41 is the hexadecimal code of uppercase A // 0x5A is the hexadecimal code of uppercase Z for letter_character_code in 0x41 ... 0x5A { print( String( format: " %c", letter_character_code ), terminator: "" ) } } func print_lowercase_letters() { print( "\n\n Lowercase English letters are: \n" ) // 0x61 is the hexadecimal code of lowercase a // 0x7A is the hexadecimal code of lowercase z for letter_character_code in 0x61 ... 0x7A { print( String( format: " %c", letter_character_code ), terminator: "" ) } } func print_letters() { print_uppercase_letters() print_lowercase_letters() print( "\n\n" ) } // The main program in this file is the following single statement. print_letters()