From 66624b671dc3b15699493b9d8e4ac2bc104b9399 Mon Sep 17 00:00:00 2001 From: hamza Date: Sat, 11 Jun 2022 14:41:16 +0100 Subject: [PATCH] add(subject): print-ascii --- subjects/printascii/README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 subjects/printascii/README.md diff --git a/subjects/printascii/README.md b/subjects/printascii/README.md new file mode 100644 index 00000000..190c2346 --- /dev/null +++ b/subjects/printascii/README.md @@ -0,0 +1,27 @@ +## print-ascii + +### instructions + +Write a program that prints the ASCII value of a character passed as an argument to the program +- If the argument is not a letter nothing will be printed +- if the number of arguments is not 1 then nothing will be printed +- the program should print (`'\n'`) at the end of the output + +### Usage + +```console +$ go run . | cat -e +$ +$ go run . a | cat -e +97$ +$ go run . 'A' | cat -e +65$ +$ go run . 'z' | cat -e +122$ +$ go run . Z | cat -e +90$ +$ go run . 1 | cat -e +$ +$ go run . "Hello" "Word" | cat -e +$ +```