diff --git a/subjects/reversebits.en.md b/subjects/reversebits.en.md index af286c783..433e3258c 100644 --- a/subjects/reversebits.en.md +++ b/subjects/reversebits.en.md @@ -2,8 +2,8 @@ ### Instructions -Write a program that takes a `byte` in binary format and that reverses it `bit` by `bit` (like the -example) +Write a program that takes a `byte` in binary format, that reverses it `bit` by `bit` (as shown in the +example) and that prints the result. ### Expected output @@ -11,11 +11,11 @@ example) student@ubuntu:~/piscine-go/reversebits$ go build student@ubuntu:~/piscine-go/reversebits$ ./reversebits Not enough arguments. -student@ubuntu:~/piscine-go/reversebits$ ./reversebits 00100110 -01100100 +student@ubuntu:~/piscine-go/reversebits$ ./reversebits 00100110 | cat -e +01100100$ student@ubuntu:~/piscine-go/reversebits$ ./reversebits "djs" -The argument "djs" doesn't represent a byte -student@ubuntu:~/piscine-go/reversebits$ ./reversebits "0102039s" -The argument "0102039s" doesn't represent a byte +The argument "djs" does not represent a byte +student@ubuntu:~/piscine-go/reversebits$ ./reversebits "0102039s" | cat -e +The argument "0102039s" does not represent a byte$ student@ubuntu:~/piscine-go/reversebits$ ``` diff --git a/subjects/reversebits.fr.md b/subjects/reversebits.fr.md index 5277611e7..50126970b 100644 --- a/subjects/reversebits.fr.md +++ b/subjects/reversebits.fr.md @@ -2,25 +2,19 @@ ### Instructions -Écrire une fonction qui prend un `byte`, qui l'inverse `bit` par `bit` (comme sur l'exemple) et qui retourne le résultat. - -### Fonction attendue - -```go -func ReverseBits(octet byte) byte { - -} -``` - -Exemple: - -1 byte - ---- - -``` -00100110 - || - \/ -01100100 +Écrire un programme qui prend un `byte`, qui l'inverse `bit` par `bit` (comme montré sur l'exemple) et qui affiche le résultat. + +### Utilisation + +```console +student@ubuntu:~/piscine-go/reversebits$ go build +student@ubuntu:~/piscine-go/reversebits$ ./reversebits +Not enough arguments. +student@ubuntu:~/piscine-go/reversebits$ ./reversebits 00100110 | cat -e +01100100$ +student@ubuntu:~/piscine-go/reversebits$ ./reversebits "djs" +The argument "djs" does not represent a byte +student@ubuntu:~/piscine-go/reversebits$ ./reversebits "0102039s" | cat -e +The argument "0102039s" does not represent a byte$ +student@ubuntu:~/piscine-go/reversebits$ ```