Browse Source

translation of enigma

content-update
Christopher Fremond 5 years ago committed by Christopher Fremond
parent
commit
1f279bf449
  1. 13
      subjects/enigma.en.md
  2. 20
      subjects/enigma.fr.md

13
subjects/enigma.en.md

@ -2,13 +2,14 @@
### Instructions
Write a function called `Enigma` that receives poiters to functions and move its values around to hide them.
Write a function called `Enigma` that receives pointers to as arguments and move its values around to hide them.
- This function will put :
- `a` into `c`;
- `c` into `d`;
- `d` into `b`;
- `b` into `a`.
This function will put :
- `a` into `c`.
- `c` into `d`.
- `d` into `b`.
- `b` into `a`.
### Expected function

20
subjects/enigma.fr.md

@ -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

Loading…
Cancel
Save