forked from root/public
Compare commits
2 Commits
master
...
1267-sumas
Author | SHA1 | Date |
---|---|---|
estlop | 1e555ed0f4 | 2 years ago |
estlop | 12260496df | 2 years ago |
1 changed files with 18 additions and 0 deletions
@ -0,0 +1,18 @@ |
|||||||
|
## sumascii |
||||||
|
|
||||||
|
### Instructions |
||||||
|
|
||||||
|
Create a program that receives an argument and displays the sum of the ASCII value of each character. The sum will be a number representing the value after the sum of the bytes. If there is an invalid input print 0. |
||||||
|
|
||||||
|
### Usage |
||||||
|
|
||||||
|
```console |
||||||
|
$ go run . "hi" | cat -e |
||||||
|
209$ |
||||||
|
$ go run . "" | cat -e |
||||||
|
0$ |
||||||
|
$ go run . "S" "A" |
||||||
|
0$ |
||||||
|
$ go run . | cat -e |
||||||
|
0$ |
||||||
|
``` |
Loading…
Reference in new issue