mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
964 B
26 lines
964 B
5 years ago
|
## nbrconvertalpha
|
||
|
|
||
|
### Instructions
|
||
|
|
||
5 years ago
|
Write a **program** that prints the corresponding letter in the `n` position of the latin alphabet, where `n` is each argument received.
|
||
5 years ago
|
|
||
5 years ago
|
For example `1` matches `a`, `2` matches `b`, etc. If `n` does not match a valid position of the alphabet or if the argument is not an integer, the **program** should print a space (" ").
|
||
5 years ago
|
|
||
5 years ago
|
A flag `--upper` should be implemented. When used the program prints the result in upper case. The flag will always be the first argument.
|
||
5 years ago
|
|
||
|
### Usage
|
||
|
|
||
5 years ago
|
```console
|
||
5 years ago
|
student@ubuntu:~/student/test$ go build
|
||
5 years ago
|
student@ubuntu:~/student/test$ ./nbrconvertalpha
|
||
5 years ago
|
student@ubuntu:~/student/test$ ./nbrconvertalpha 8 5 12 12 15 | cat -e
|
||
|
hello$
|
||
|
student@ubuntu:~/student/test$ ./nbrconvertalpha 12 5 7 5 14 56 4 1 18 25 | cat -e
|
||
|
legen dary$
|
||
|
student@ubuntu:~/student/test$ ./nbrconvertalpha 32 86 h | cat -e
|
||
|
$
|
||
5 years ago
|
student@ubuntu:~/student/test$ ./nbrconvertalpha --upper 8 5 25
|
||
5 years ago
|
HEY$
|
||
5 years ago
|
student@ubuntu:~/student/test$
|
||
5 years ago
|
```
|