Professional Documents
Culture Documents
Assignment 1: ASCII Art
Assignment 1: ASCII Art
Department of Computer Science and Engineering, The Chinese University of Hong Kong
Introduction
This assignment allows you to become familiar with Visual Studio Community 2017. (Details on using
Visual Studio can be found in Tutorial 1.) You will write a simple program to print out some text in
ASCII art using printf.
The following shows the digits 0–9 and alphabets A–Z in ASCII art, which consists of the space and
other symbols.
A: B: C: D: E:
F: G: H: I: J:
K: L: M: N:
O: P: Q: R:
S: T: U: V:
W: X: Y: Z:
0: 1: 2: 3:
4: 5: 6: 7:
8: 9:
Program Specification
In Visual Studio, create a “Windows Desktop Wizard” project and add a source file named ascii.c.
Modify the program in Figure 1 so that it should print out your surname followed by the last four digits
of your student ID in ASCII art. Please be reminded of the following:
One digit/letter should be immediately followed by another digit/letter without any column of
spaces in between.
Do not confuse the backtick ` and the single quote '.
Do not confuse the underscore _ and the minus sign -.
Do not confuse the lowercase letter o, uppercase letter O, and digit 0.
Do not confuse the lowercase letter w and uppercase letter W.
The backslash \ and double-quote " symbols should be printed specially. (E.g., to print one ",
you should type \" in the program.)
For example, if your surname is Law and your student ID ends in 6894, then your program should print
out LAW6894 in ASCII art. Figure 2 shows the detailed ASCII art output of LAW6894.