mirror of https://github.com/01-edu/public.git
Update README.md
This commit is contained in:
parent
66624b671d
commit
fbb90f82d2
|
@ -1,27 +1,23 @@
|
|||
## print-ascii
|
||||
|
||||
### instructions
|
||||
### Instructions
|
||||
|
||||
Write a program that prints the ASCII value of a character passed as an argument to the program
|
||||
Write a program that prints the ASCII value of a letter passed
|
||||
- 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
|
||||
$
|
||||
$ go run .
|
||||
$ go run . a
|
||||
97
|
||||
$ go run . 'A'
|
||||
65
|
||||
$ go run . 'z'
|
||||
122
|
||||
$ go run . Z
|
||||
90
|
||||
$ go run . 1
|
||||
$ go run . "Hello" "Word"
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue