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.
23 lines
541 B
23 lines
541 B
6 years ago
|
## printhex
|
||
|
|
||
|
### Instructions
|
||
|
|
||
6 years ago
|
Write a program that takes a positive (or zero) number expressed in base 10, and displays it in base 16 ( with lowercase letters) followed by a newline.
|
||
6 years ago
|
|
||
|
- If the number of parameters is not 1, the program displays a newline.
|
||
|
|
||
6 years ago
|
Examples of outputs :
|
||
6 years ago
|
|
||
|
```console
|
||
|
student@ubuntu:~/piscine/test$ go build
|
||
|
student@ubuntu:~/piscine/test$ ./test "10"
|
||
|
a
|
||
|
student@ubuntu:~/piscine/test$ ./test "255"
|
||
|
ff
|
||
|
student@ubuntu:~/piscine/test$ ./test "5156454"
|
||
|
4eae66
|
||
|
student@ubuntu:~/piscine/test$
|
||
|
|
||
|
student@ubuntu:~/piscine/
|
||
6 years ago
|
```
|