Browse Source

adaptation of fr subject

content-update
Christopher Fremond 5 years ago committed by Christopher Fremond
parent
commit
a230bc1449
  1. 14
      subjects/reversebits.en.md
  2. 36
      subjects/reversebits.fr.md

14
subjects/reversebits.en.md

@ -2,8 +2,8 @@
### Instructions ### Instructions
Write a program that takes a `byte` in binary format and that reverses it `bit` by `bit` (like the Write a program that takes a `byte` in binary format, that reverses it `bit` by `bit` (as shown in the
example) example) and that prints the result.
### Expected output ### Expected output
@ -11,11 +11,11 @@ example)
student@ubuntu:~/piscine-go/reversebits$ go build student@ubuntu:~/piscine-go/reversebits$ go build
student@ubuntu:~/piscine-go/reversebits$ ./reversebits student@ubuntu:~/piscine-go/reversebits$ ./reversebits
Not enough arguments. Not enough arguments.
student@ubuntu:~/piscine-go/reversebits$ ./reversebits 00100110 student@ubuntu:~/piscine-go/reversebits$ ./reversebits 00100110 | cat -e
01100100 01100100$
student@ubuntu:~/piscine-go/reversebits$ ./reversebits "djs" student@ubuntu:~/piscine-go/reversebits$ ./reversebits "djs"
The argument "djs" doesn't represent a byte The argument "djs" does not represent a byte
student@ubuntu:~/piscine-go/reversebits$ ./reversebits "0102039s" student@ubuntu:~/piscine-go/reversebits$ ./reversebits "0102039s" | cat -e
The argument "0102039s" doesn't represent a byte The argument "0102039s" does not represent a byte$
student@ubuntu:~/piscine-go/reversebits$ student@ubuntu:~/piscine-go/reversebits$
``` ```

36
subjects/reversebits.fr.md

@ -2,25 +2,19 @@
### Instructions ### Instructions
Écrire une fonction qui prend un `byte`, qui l'inverse `bit` par `bit` (comme sur l'exemple) et qui retourne le résultat. Écrire un programme qui prend un `byte`, qui l'inverse `bit` par `bit` (comme montré sur l'exemple) et qui affiche le résultat.
### Fonction attendue ### Utilisation
```go ```console
func ReverseBits(octet byte) byte { 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$
Exemple: student@ubuntu:~/piscine-go/reversebits$ ./reversebits "djs"
The argument "djs" does not represent a byte
1 byte student@ubuntu:~/piscine-go/reversebits$ ./reversebits "0102039s" | cat -e
The argument "0102039s" does not represent a byte$
--- student@ubuntu:~/piscine-go/reversebits$
```
00100110
||
\/
01100100
``` ```

Loading…
Cancel
Save