|
|
|
@ -2,15 +2,15 @@
|
|
|
|
|
|
|
|
|
|
### Instructions |
|
|
|
|
|
|
|
|
|
Write a function called `Enigma` that receives poiters to functions and move its values around to hide them. |
|
|
|
|
Écrire une fonction nommé `Enigma` qui prends des pointeurs comme arguments et qui interchanges leurs valeurs pour les cacher. |
|
|
|
|
Cette fonction déplacera : |
|
|
|
|
|
|
|
|
|
- This function will put : |
|
|
|
|
- `a` into `c`; |
|
|
|
|
- `c` into `d`; |
|
|
|
|
- `d` into `b`; |
|
|
|
|
- `b` into `a`. |
|
|
|
|
- `a` dans `c`. |
|
|
|
|
- `c` dans `d`. |
|
|
|
|
- `d` dans `b`. |
|
|
|
|
- `b` dans `a`. |
|
|
|
|
|
|
|
|
|
### Expected function |
|
|
|
|
### Fonction attendue |
|
|
|
|
|
|
|
|
|
```go |
|
|
|
|
func Enigma(a ***int, b *int, c *******int, d ****int) { |
|
|
|
@ -18,9 +18,9 @@ func Enigma(a ***int, b *int, c *******int, d ****int) {
|
|
|
|
|
} |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
### Usage |
|
|
|
|
### Utilisation |
|
|
|
|
|
|
|
|
|
Here is a possible [program](TODO-LINK) to test your function : |
|
|
|
|
Voici un éventuel [programme](TODO-LINK) pour tester votre fonction : |
|
|
|
|
|
|
|
|
|
```go |
|
|
|
|
package main |
|
|
|
@ -70,7 +70,7 @@ func main() {
|
|
|
|
|
} |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
And its output : |
|
|
|
|
Et son résultat : |
|
|
|
|
|
|
|
|
|
```console |
|
|
|
|
student@ubuntu:~/piscine/test$ go build |
|
|
|
|