From 418a58ead9a703f6bf8e99dcdacdab5e79b0be88 Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Wed, 30 Aug 2023 12:47:37 -0400 Subject: [PATCH] adding example --- hws/01_text_justification/README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/hws/01_text_justification/README.md b/hws/01_text_justification/README.md index bd52f33..79ad5a9 100644 --- a/hws/01_text_justification/README.md +++ b/hws/01_text_justification/README.md @@ -24,7 +24,7 @@ Let’s look at a simple example. Here is a sample input file, named example.txt And here’s the output produced for that input file for the three different justification modes, for the specified text width of 16: -flush left +**flush left** ```txt -------------------- | Here is an | @@ -33,6 +33,24 @@ flush left -------------------- ``` +**flush right** +```txt +-------------------- +| Here is an | +| example of text | +| justification. | +-------------------- +``` + +**full justify** +```txt +-------------------- +| Here is an | +| example of text | +| justification. | +-------------------- +``` + First note that the output includes a simple ascii art line box drawn around the text, but those characters do not count towards the specified line width of the text. In other words, each line of final output is actually 4 characters longer, in this example, 20 total characters. Notice that the same words appear on each line