Browse Source

250

pull/297/head
Xavier Petit 5 years ago committed by Clément
parent
commit
c1df5a81ab
  1. 2
      subjects/addprimesum.en.md
  2. 4
      subjects/addprimesum.fr.md
  3. 1
      subjects/advancedsortwordarr.en.md
  4. 1
      subjects/advancedsortwordarr.fr.md
  5. 18
      subjects/alphamirror.en.md
  6. 16
      subjects/alphamirror.fr.md
  7. 3
      subjects/any.en.md
  8. 5
      subjects/any.fr.md
  9. 3
      subjects/appendrange.en.md
  10. 2
      subjects/appendrange.fr.md
  11. 2
      subjects/atoi.en.md
  12. 2
      subjects/atoi.fr.md
  13. 4
      subjects/basicatoi.en.md
  14. 4
      subjects/basicatoi.fr.md
  15. 6
      subjects/basicatoi2.en.md
  16. 4
      subjects/basicatoi2.fr.md
  17. 8
      subjects/boolean.en.md
  18. 10
      subjects/boolean.fr.md
  19. 24
      subjects/brackets.en.md
  20. 21
      subjects/brackets.fr.md
  21. 30
      subjects/brainfuck.en.md
  22. 32
      subjects/brainfuck.fr.md
  23. 6
      subjects/btreeapplybylevel.en.md
  24. 6
      subjects/btreeapplybylevel.fr.md
  25. 3
      subjects/btreeapplyinorder.en.md
  26. 3
      subjects/btreeapplyinorder.fr.md
  27. 2
      subjects/btreeapplypostorder.fr.md
  28. 2
      subjects/btreeapplypreorder.fr.md
  29. 7
      subjects/btreedeletenode.en.md
  30. 7
      subjects/btreedeletenode.fr.md
  31. 6
      subjects/btreeinsertdata.en.md
  32. 5
      subjects/btreeinsertdata.fr.md
  33. 6
      subjects/btreeisbinary.en.md
  34. 6
      subjects/btreeisbinary.fr.md
  35. 6
      subjects/btreelevelcount.en.md
  36. 6
      subjects/btreelevelcount.fr.md
  37. 6
      subjects/btreemax.en.md
  38. 6
      subjects/btreemax.fr.md
  39. 6
      subjects/btreemin.en.md
  40. 6
      subjects/btreemin.fr.md
  41. 6
      subjects/btreetransplant.en.md
  42. 6
      subjects/btreetransplant.fr.md
  43. 2
      subjects/capitalizeprog.fr.md
  44. 9
      subjects/cat.en.md
  45. 9
      subjects/cat.fr.md
  46. 4
      subjects/comcheck.en.md
  47. 4
      subjects/comcheck.fr.md
  48. 2
      subjects/compact.fr.md
  49. 2
      subjects/compareprog.en.md
  50. 2
      subjects/compareprog.fr.md
  51. 1
      subjects/concatparams.fr.md
  52. 1
      subjects/convertbase.en.md
  53. 1
      subjects/convertbase.fr.md
  54. 3
      subjects/countdown.en.md
  55. 2
      subjects/countdown.fr.md
  56. 1
      subjects/countif.en.md
  57. 1
      subjects/countif.fr.md
  58. 6
      subjects/displaya.en.md
  59. 2
      subjects/displaya.fr.md
  60. 8
      subjects/displayalpham.en.md
  61. 8
      subjects/displayalpham.fr.md
  62. 8
      subjects/displayalrevm.en.md
  63. 8
      subjects/displayalrevm.fr.md
  64. 8
      subjects/displayfile.en.md
  65. 8
      subjects/displayfile.fr.md
  66. 2
      subjects/displayfirstparam.en.md
  67. 2
      subjects/displayfirstparam.fr.md
  68. 2
      subjects/displaylastparam.en.md
  69. 2
      subjects/displaylastparam.fr.md
  70. 5
      subjects/displayz.en.md
  71. 2
      subjects/displayz.fr.md
  72. 14
      subjects/expandstr.en.md
  73. 16
      subjects/expandstr.fr.md
  74. 1
      subjects/fibonacci.fr.md
  75. 6
      subjects/firstword.en.md
  76. 6
      subjects/firstword.fr.md
  77. 1
      subjects/foreach.en.md
  78. 1
      subjects/foreach.fr.md
  79. 2
      subjects/fprime.en.md
  80. 4
      subjects/fprime.fr.md
  81. 21
      subjects/gcd.en.md
  82. 22
      subjects/gcd.fr.md
  83. 2
      subjects/hello.en.md
  84. 2
      subjects/hello.fr.md
  85. 18
      subjects/hiddenp.en.md
  86. 19
      subjects/hiddenp.fr.md
  87. 6
      subjects/inter.en.md
  88. 6
      subjects/inter.fr.md
  89. 2
      subjects/ispowerof2.fr.md
  90. 1
      subjects/issorted.en.md
  91. 1
      subjects/issorted.fr.md
  92. 20
      subjects/lastword.en.md
  93. 20
      subjects/lastword.fr.md
  94. 1
      subjects/listat.en.md
  95. 1
      subjects/listat.fr.md
  96. 2
      subjects/listclear.en.md
  97. 2
      subjects/listclear.fr.md
  98. 2
      subjects/listlast.en.md
  99. 2
      subjects/listlast.fr.md
  100. 1
      subjects/listpushback.en.md
  101. Some files were not shown because too many files changed in this diff diff.show_more

2
subjects/addprimesum.en.md

@ -2,7 +2,7 @@
### Instructions
Write a program that takes a positive integer as argument and displays the sum of all prime numbers inferior or equal to it followed by a newline(`'\n`').
Write a program that takes a positive integer as argument and displays the sum of all prime numbers inferior or equal to it followed by a newline (`'\n'`).
- If the number of arguments is different from 1, or if the argument is not a positive number, the program displays `0` followed by a newline.

4
subjects/addprimesum.fr.md

@ -2,9 +2,9 @@
### Instructions
Écrire un programme qui prend un entier positif comme argument et qui affiche la somme de tous les nombres premiers inférieurs ou égaux à celui-ci, suivie d'un newline(`'\n`').
Écrire un programme qui prend un entier positif comme argument et qui affiche la somme de tous les nombres premiers inférieurs ou égaux à celui-ci, suivie d'un retour à la ligne (`'\n'`).
- Si le nombre d'arguments est différent de 1, ou si l'argument n'est pas un nombre positif, le programme affiche `0` suivi d'un newline.
- Si le nombre d'arguments est différent de 1, ou si l'argument n'est pas un nombre positif, le programme affiche `0` suivi d'un retour à la ligne.
### Utilisation

1
subjects/advancedsortwordarr.en.md

@ -8,6 +8,7 @@ Write a function `AdvancedSortWordArr` that sorts a `string` array, based on the
```go
func AdvancedSortWordArr(array []string, f func(a, b string) int) {
}
```

1
subjects/advancedsortwordarr.fr.md

@ -8,6 +8,7 @@
```go
func AdvancedSortWordArr(array []string, f func(a, b string) int) {
}
```

18
subjects/alphamirror.en.md

@ -2,28 +2,26 @@
### Instructions
Write a program called `alphamirror` that takes a `string` as argument and displays this `string`
after replacing each alphabetical character with the opposite alphabetical
character.
Write a program called `alphamirror` that takes a `string` as argument and displays this `string` after replacing each alphabetical character with the opposite alphabetical character.
The case of the letter stays the same, for example :
'a' becomes 'z', 'Z' becomes 'A'
'd' becomes 'w', 'M' becomes 'N'
The final result will be followed by a newline(`'\n'`).
The final result will be followed by a newline (`'\n'`).
If the number of arguments is different from 1, the program displays only a newline(`'\n'`).
If the number of arguments is different from 1, the program displays only a newline (`'\n'`).
### Usage
```console
student@ubuntu:~/student/alphamirror$ go build
student@ubuntu:~/student/alphamirror$ ./alphamirror "abc"
student@ubuntu:~/piscine-go/alphamirror$ go build
student@ubuntu:~/piscine-go/alphamirror$ ./alphamirror "abc"
zyx
student@ubuntu:~/student/alphamirror$ ./alphamirror "My horse is Amazing." | cat -e
student@ubuntu:~/piscine-go/alphamirror$ ./alphamirror "My horse is Amazing." | cat -e
Nb slihv rh Znzarmt.$
student@ubuntu:~/student/alphamirror$ ./alphamirror | cat -e
student@ubuntu:~/piscine-go/alphamirror$ ./alphamirror | cat -e
$
student@ubuntu:~/student/alphamirror$
student@ubuntu:~/piscine-go/alphamirror$
```

16
subjects/alphamirror.fr.md

@ -2,26 +2,26 @@
### Instructions
Écrire un programme nommé `alphamirror` qui prend une `string` come argument et qui affiche cette `string` après remplacement de chaque caractère alphabétique avec son opposé.
Écrire un programme nommé `alphamirror` qui prend une `string` comme argument et qui affiche cette `string` après remplacement de chaque caractère alphabétique avec son opposé.
Les majuscules restent des majuscules, de même pour le minuscules, par exemple :
'a' devient 'z', 'Z' devient 'A'
'd' devient 'w', 'M' devient 'N'
Le résultat final sera suivi d'un newline(`'\n'`).
Le résultat final sera suivi d'un retour à la ligne (`'\n'`).
Si le nombre d'arguments est différent de 1, le programme affiche seulement un newline(`'\n'`).
Si le nombre d'arguments est différent de 1, le programme affiche seulement un retour à la ligne (`'\n'`).
### Utilisation
```console
student@ubuntu:~/student/alphamirror$ go build
student@ubuntu:~/student/alphamirror$ ./alphamirror "abc"
student@ubuntu:~/piscine-go/alphamirror$ go build
student@ubuntu:~/piscine-go/alphamirror$ ./alphamirror "abc"
zyx
student@ubuntu:~/student/alphamirror$ ./alphamirror "My horse is Amazing." | cat -e
student@ubuntu:~/piscine-go/alphamirror$ ./alphamirror "My horse is Amazing." | cat -e
Nb slihv rh Znzarmt.$
student@ubuntu:~/student/alphamirror$ ./alphamirror | cat -e
student@ubuntu:~/piscine-go/alphamirror$ ./alphamirror | cat -e
$
student@ubuntu:~/student/alphamirror$
student@ubuntu:~/piscine-go/alphamirror$
```

3
subjects/any.en.md

@ -2,7 +2,7 @@
### Instructions
Write a function `Any` that returns `true`, for a `string` array:
Write a function `Any` that returns `true`, for a `string` array :
- if, when that `string` array is passed through an `f` function, at least one element returns `true`.
@ -10,6 +10,7 @@ Write a function `Any` that returns `true`, for a `string` array:
```go
func Any(f func(string) bool, arr []string) bool {
}
```

5
subjects/any.fr.md

@ -2,14 +2,15 @@
### Instructions
Écrire une fonction `Any` qui retournes `true`, pour un tableau de `string`:
Écrire une fonction `Any` qui retourne `true`, pour un tableau de `string` :
- si, lorsque ce tableau de `string` est passé à travers une fonction `f`, au moins un element retournes `true`.
- si, lorsque ce tableau de `string` est passé à travers une fonction `f`, au moins un element retourne `true`.
### Fonction attendue
```go
func Any(f func(string) bool, arr []string) bool {
}
```

3
subjects/appendrange.en.md

@ -2,8 +2,7 @@
### Instructions
Write a function that takes an `int` min and an `int` max as parameters.
That function returns a slice of `int` with all the values between min and max.
Write a function that takes an `int` min and an `int` max as parameters. That function returns a slice of `int` with all the values between min and max.
Min is included, and max is excluded.

2
subjects/appendrange.fr.md

@ -2,7 +2,7 @@
### Instructions
Écrire une fonction qui prend un `int` minimum et un `int` maximum comme paramètres. Cette fonction retournes une slice d'`int` avec toutes les valeurs comprises entre le minimum et le maximum.
Écrire une fonction qui prend un `int` minimum et un `int` maximum comme paramètres. Cette fonction retourne une slice d'`int` avec toutes les valeurs comprises entre le minimum et le maximum.
Le minimum est inclus, le maximum est exclu.

2
subjects/atoi.en.md

@ -8,7 +8,7 @@
- For this exercise the handling of the signs + or - **does have** to be taken into account.
- This function will **only** have to return the `int` `nbr`. For this exercise the `error` return of atoi is not required.
- This function will **only** have to return the `int`. For this exercise the `error` result of atoi is not required.
### Expected function

2
subjects/atoi.fr.md

@ -8,7 +8,7 @@
- Pour cet exercice la gestion des signes + ou - **doit être** prise en compte.
- Cette fonction aura **seulement** à retourner l'`int` (entier) `nbr`. Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé.
- Cette fonction aura **seulement** à retourner l'`int` (entier). Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé.
### Fonction attendue

4
subjects/basicatoi.en.md

@ -6,9 +6,9 @@
- Atoi returns `0` if the `string` is not considered as a valid number. For this exercise **only valid** `string` chains will be tested. They will only contain one or several digits as characters.
- For this exercise the handling of the signs + or - does not have to be taken into account.
- For this exercise the handling of the signs `+` or `-` does not have to be taken into account.
- This function will **only** have to return the `int` `nbr`. For this exercise the `error` return of atoi is not required.
- This function will **only** have to return the `int`. For this exercise the `error` return of atoi is not required.
### Expected function

4
subjects/basicatoi.fr.md

@ -6,9 +6,9 @@
- Atoi retourne `0` si la `string` n'est pas considéré un nombre valide. Pour cet exercice **seulement des** `string` **valides** seront testé. Elles ne contiendront que un ou plusieurs chiffres comme charact.
- Pour cet exercice la gestion des signes + ou - ne doit pas être prise en compte.
- Pour cet exercice la gestion des signes `+` ou `-` ne doit pas être prise en compte.
- Cette fonction aura **seulement** à retourner l'`int` (entier) `nbr`. Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé.
- Cette fonction aura **seulement** à retourner l'`int` (entier). Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé.
### Fonction attendue

6
subjects/basicatoi2.en.md

@ -6,11 +6,11 @@
- Atoi returns `0` if the `string` is not considered as a valid number. For this exercise **non-valid `string` chains will be tested**. Some will contain non-digits characters.
- For this exercise the handling of the signs + or - does not have to be taken into account.
- For this exercise the handling of the signs `+` or `-` does not have to be taken into account.
- This function will **only** have to return the `int` `nbr`. For this exercise the `error` return of atoi is not required.
- This function will **only** have to return the `int`. For this exercise the `error` return of atoi is not required.
### Expected Function
### Expected function
```go
func BasicAtoi2(s string) int {

4
subjects/basicatoi2.fr.md

@ -6,9 +6,9 @@
- Atoi retourne `0` si la `string` n'est pas considérée comme un nombre valide. Pour cet exercice des **`string` non valides seront testées!**. Certaines contiendront d'autres caractères que des chiffres.
- Pour cet exercice la gestion des signes + ou - ne doit pas être prise en compte.
- Pour cet exercice la gestion des signes `+` ou `-` ne doit pas être prise en compte.
- Cette fonction aura **seulement** à retourner l'`int` (entier) `nbr`. Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé.
- Cette fonction aura **seulement** à retourner l'`int` (entier). Pour cet exercice le retour d'erreur d'atoi de go n'est pas demandé.
### Fonction attendue

8
subjects/boolean.en.md

@ -39,12 +39,12 @@ func main() {
}
```
### Expected output
### Usage
```console
student@ubuntu:~/student/boolean$ go build
student@ubuntu:~/student/boolean$ ./boolean "not" "odd"
student@ubuntu:~/piscine-go/boolean$ go build
student@ubuntu:~/piscine-go/boolean$ ./boolean "not" "odd"
I have an even number of arguments
student@ubuntu:~/student/boolean$ ./boolean "not even"
student@ubuntu:~/piscine-go/boolean$ ./boolean "not even"
I have an odd number of arguments
```

10
subjects/boolean.fr.md

@ -6,7 +6,7 @@ Créer un fichier `.go`.
- Le code ci-dessous doit être copié dans ce fichier.
- Les changements nécéssaires doivent être appliquer pour que le programme fonctionne.
- Les changements nécéssaires doivent être appliqués pour que le programme fonctionne.
- Le programme doit être rendu dans un dossier nommé `boolean`.
@ -39,12 +39,12 @@ func main() {
}
```
### Usage
### Utilisation
```console
student@ubuntu:~/student/boolean$ go build
student@ubuntu:~/student/boolean$ ./boolean "not" "odd"
student@ubuntu:~/piscine-go/boolean$ go build
student@ubuntu:~/piscine-go/boolean$ ./boolean "not" "odd"
I have an even number of arguments
student@ubuntu:~/student/boolean$ ./boolean "not even"
student@ubuntu:~/piscine-go/boolean$ ./boolean "not even"
I have an odd number of arguments
```

24
subjects/brackets.en.md

@ -2,32 +2,26 @@
### Instructions
Write a program that takes an undefined number of `strings` in arguments. For each
argument, if the expression is correctly bracketed, the program prints on the standard output `OK` followed by a newline(`'\n'`), otherwise it prints "Error" followed by
a newline.
Write a program that takes an undefined number of `string` in arguments. For each argument, if the expression is correctly bracketed, the program prints on the standard output `OK` followed by a newline (`'\n'`), otherwise it prints `Error` followed by a newline.
Symbols considered as `brackets` are parentheses `(` and `)`, square brackets `[`
and `]` and curly braces `{` and `}`. Every other symbols are simply ignored.
Symbols considered as brackets are parentheses `(` and `)`, square brackets `[` and `]` and curly braces `{` and `}`. Every other symbols are simply ignored.
An opening bracket must always be closed by the good closing bracket in the
correct order. A `string` which does not contain any bracket is considered as a
correctly bracketed `string`.
An opening bracket must always be closed by the good closing bracket in the correct order. A `string` which does not contain any bracket is considered as a correctly bracketed `string`.
If there is no argument, the program must print only a newline.
### Usage
```console
student@ubuntu:~/student/brackets$ go build
student@ubuntu:~/student/brackets$ ./brackets '(johndoe)' | cat -e
student@ubuntu:~/piscine-go/brackets$ go build
student@ubuntu:~/piscine-go/brackets$ ./brackets '(johndoe)' | cat -e
OK$
student@ubuntu:~/student/brackets$ ./brackets '([)]' | cat -e
student@ubuntu:~/piscine-go/brackets$ ./brackets '([)]' | cat -e
Error$
student@ubuntu:~/student/brackets$ ./brackets '' '{[(0 + 0)(1 + 1)](3*(-1)){()}}' | cat -e
student@ubuntu:~/piscine-go/brackets$ ./brackets '' '{[(0 + 0)(1 + 1)](3*(-1)){()}}' | cat -e
OK$
OK$
student@ubuntu:~/student/brackets$ ./brackets | cat -e
student@ubuntu:~/piscine-go/brackets$ ./brackets | cat -e
$
student@ubuntu:~/student/brackets$
student@ubuntu:~/piscine-go/brackets$
```

21
subjects/brackets.fr.md

@ -2,29 +2,26 @@
### Instructions
Écrire un programme qui prend un nombre indéfini de `strings` en arguments. Pour chaque
argument, si l'expression est correctement "entre parenthèses" (bracketed), le programme affiche sur la sortie standard `OK` suivi d'un newline(`'\n'`), autrement il affiche `Error` suivi d'un newline.
Écrire un programme qui prend un nombre indéfini de `string` en arguments. Pour chaque argument, si l'expression est correctement "entre parenthèses" (bracketed), le programme affiche sur la sortie standard `OK` suivi d'un retour à la ligne (`'\n'`), autrement il affiche `Error` suivi d'un retour à la ligne.
Les symboles considérés comme des `parenthèses` sont les parenthèses `(` et `)`, les crochets `[`
et `]` et les accolades `{` et `}`. Tout autre symbole est simplement ignoré.
Les symboles considérés comme des parenthèses sont `(` et `)`, les crochets `[` et `]` et les accolades `{` et `}`. Tout autre symbole est simplement ignoré.
Une parenthèse ouvrante doit toujours être fermée par la parenthèse correspondante dans l'ordre correct. Une `string` qui ne contient aucune parenthèse est considérée comme une `string` correctement "entre parenthèses".
Si il n'y a pas d'argument, le programme affiche seulement un newline.
Si il n'y a pas d'argument, le programme affiche seulement un retour à la ligne.
### Utilisation
```console
student@ubuntu:~/student/brackets$ go build
student@ubuntu:~/student/brackets$ ./brackets '(johndoe)' | cat -e
student@ubuntu:~/piscine-go/brackets$ go build
student@ubuntu:~/piscine-go/brackets$ ./brackets '(johndoe)' | cat -e
OK$
student@ubuntu:~/student/brackets$ ./brackets '([)]' | cat -e
student@ubuntu:~/piscine-go/brackets$ ./brackets '([)]' | cat -e
Error$
student@ubuntu:~/student/brackets$ ./brackets '' '{[(0 + 0)(1 + 1)](3*(-1)){()}}' | cat -e
student@ubuntu:~/piscine-go/brackets$ ./brackets '' '{[(0 + 0)(1 + 1)](3*(-1)){()}}' | cat -e
OK$
OK$
student@ubuntu:~/student/brackets$ ./brackets | cat -e
student@ubuntu:~/piscine-go/brackets$ ./brackets | cat -e
$
student@ubuntu:~/student/brackets$
student@ubuntu:~/piscine-go/brackets$
```

30
subjects/brainfuck.en.md

@ -5,33 +5,31 @@
Write a `Brainfuck` interpreter program.
The source code will be given as first parameter.
The code will always be valid, with less than 4096 operations.
`Brainfuck` is a minimalist language. It consists of an array of bytes
(in this exercice 2048 bytes) all initialized with zero,
and with a pointer to its first byte.
`Brainfuck` is a minimalist language. It consists of an array of bytes (in this exercice 2048 bytes) all initialized with zero, and with a pointer to its first byte.
Every operator consists of a single character :
- '>' increment the pointer ;
- '<' decrement the pointer ;
- '+' increment the pointed byte ;
- '-' decrement the pointed byte ;
- '.' print the pointed byte on standard output ;
- '[' go to the matching ']' if the pointed byte is 0 (loop start) ;
- ']' go to the matching '[' if the pointed byte is not 0 (loop end).
- '>' increment the pointer
- '<' decrement the pointer
- '+' increment the pointed byte
- '-' decrement the pointed byte
- '.' print the pointed byte on standard output
- '[' go to the matching ']' if the pointed byte is 0 (loop start)
- ']' go to the matching '[' if the pointed byte is not 0 (loop end)
Any other character is a comment.
### Usage
```console
student@ubuntu:~/student/brainfuck$ go build
student@ubuntu:~/student/brainfuck$ ./brainfuck "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." | cat -e
student@ubuntu:~/piscine-go/brainfuck$ go build
student@ubuntu:~/piscine-go/brainfuck$ ./brainfuck "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." | cat -e
Hello World!$
student@ubuntu:~/student/brainfuck$ ./brainfuck "+++++[>++++[>++++H>+++++i<<-]>>>++\n<<<<-]>>--------.>+++++.>." | cat -e
student@ubuntu:~/piscine-go/brainfuck$ ./brainfuck "+++++[>++++[>++++H>+++++i<<-]>>>++\n<<<<-]>>--------.>+++++.>." | cat -e
Hi$
student@ubuntu:~/student/brainfuck$ ./brainfuck "++++++++++[>++++++++++>++++++++++>++++++++++<<<-]>---.>--.>-.>++++++++++." | cat -e
student@ubuntu:~/piscine-go/brainfuck$ ./brainfuck "++++++++++[>++++++++++>++++++++++>++++++++++<<<-]>---.>--.>-.>++++++++++." | cat -e
abc$
student@ubuntu:~/student/brainfuck$ ./brainfuck | cat -e
student@ubuntu:~/piscine-go/brainfuck$ ./brainfuck | cat -e
$
student@ubuntu:~/student/brainfuck$
student@ubuntu:~/piscine-go/brainfuck$
```

32
subjects/brainfuck.fr.md

@ -4,34 +4,32 @@
Écrire un program interpréteur du `Brainfuck`.
Le code source sera donné en premier paramètre.
Le code sera toujours valide, avec moins de 4096 operations.
Le `Brainfuck` est un langage minimaliste. Il consiste en un slice de bytes (octet)
(dans cet exercise 2048 bytes) tous initialisés à zéro,
et avec un pointeur sur le premier byte.
Le code sera toujours valide, avec moins de 4096 opérations.
Le `Brainfuck` est un langage minimaliste. Il consiste en un slice de `byte` (octets) (dans cet exercise 2048 octets) tous initialisés à zéro, et avec un pointeur sur le premier octet.
Chaque opérateur consiste en un seul caractère :
- '>' incrémente le pointeur ;
- '<' décrémente le pointeur ;
- '+' incrémente le byte pointé ;
- '-' décrémente le byte pointé ;
- '.' affiche le byte pointé sur la sortie standard ;
- '[' se rend à son ']' correspondant si le byte pointé est 0 (début de la boucle) ;
- ']' se rend à son '[' correspondant si le byte pointé n'est pas 0 (fin de la boucle).
- '>' incrémente le pointeur
- '<' décrémente le pointeur
- '+' incrémente le byte pointé
- '-' décrémente le byte pointé
- '.' affiche le byte pointé sur la sortie standard
- '[' se rend à son ']' correspondant si le byte pointé est 0 (début de la boucle)
- ']' se rend à son '[' correspondant si le byte pointé n'est pas 0 (fin de la boucle)
Tout autre caractère est un commentaire.
### Utilisation
```console
student@ubuntu:~/student/brainfuck$ go build
student@ubuntu:~/student/brainfuck$ ./brainfuck "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." | cat -e
student@ubuntu:~/piscine-go/brainfuck$ go build
student@ubuntu:~/piscine-go/brainfuck$ ./brainfuck "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." | cat -e
Hello World!$
student@ubuntu:~/student/brainfuck$ ./brainfuck "+++++[>++++[>++++H>+++++i<<-]>>>++\n<<<<-]>>--------.>+++++.>." | cat -e
student@ubuntu:~/piscine-go/brainfuck$ ./brainfuck "+++++[>++++[>++++H>+++++i<<-]>>>++\n<<<<-]>>--------.>+++++.>." | cat -e
Hi$
student@ubuntu:~/student/brainfuck$ ./brainfuck "++++++++++[>++++++++++>++++++++++>++++++++++<<<-]>---.>--.>-.>++++++++++." | cat -e
student@ubuntu:~/piscine-go/brainfuck$ ./brainfuck "++++++++++[>++++++++++>++++++++++>++++++++++<<<-]>---.>--.>-.>++++++++++." | cat -e
abc$
student@ubuntu:~/student/brainfuck$ ./brainfuck | cat -e
student@ubuntu:~/piscine-go/brainfuck$ ./brainfuck | cat -e
$
student@ubuntu:~/student/brainfuck$
student@ubuntu:~/piscine-go/brainfuck$
```

6
subjects/btreeapplybylevel.en.md

@ -36,11 +36,11 @@ func main() {
And its output :
```console
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
4
1
7
5
student@ubuntu:~/student/test$
student@ubuntu:~/piscine-go/test$
```

6
subjects/btreeapplybylevel.fr.md

@ -36,11 +36,11 @@ func main() {
Et son résultat :
```console
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
4
1
7
5
student@ubuntu:~/student/test$
student@ubuntu:~/piscine-go/test$
```

3
subjects/btreeapplyinorder.en.md

@ -2,8 +2,7 @@
### Instructions
Write a function that applies a function in order to each element in the tree.
(see `in order tree walks`)
Write a function that applies a function in order to each element in the tree (see "in order tree walks").
### Expected function

3
subjects/btreeapplyinorder.fr.md

@ -2,8 +2,7 @@
### Instructions
Écrire une fonction qui applique une fonction en ordre (in order) a chaque élément de l'arbre.
(voir les `in order tree walks`)
Écrire une fonction qui applique une fonction en ordre (in order) à chaque élément de l'arbre (voir les "in order tree walks").
### Fonction attendue

2
subjects/btreeapplypostorder.fr.md

@ -2,7 +2,7 @@
### Instructions
Écrire une fonction qui applique une fonction en post-ordre (`postorder walk`) à chaque élément de l'arbre.
Écrire une fonction qui applique une fonction en post-ordre ("postorder walk") à chaque élément de l'arbre.
### Fonction attendue

2
subjects/btreeapplypreorder.fr.md

@ -2,7 +2,7 @@
### Instructions
Écrire une fonction qui applique une fonction en pré-ordre (`preorder walk`) a chaque élément de l'arbre.
Écrire une fonction qui applique une fonction en pré-ordre ("preorder walk") à chaque élément de l'arbre.
### Fonction attendue

7
subjects/btreedeletenode.en.md

@ -12,7 +12,6 @@ The resulting tree should still follow the binary search tree rules.
func BTreeDeleteNode(root, node *TreeNode) *TreeNode {
}
```
### Usage
@ -44,8 +43,8 @@ func main() {
And its output :
```console
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
Before delete:
1
4
@ -55,5 +54,5 @@ After delete:
1
5
7
student@ubuntu:~/student/test$
student@ubuntu:~/piscine-go/test$
```

7
subjects/btreedeletenode.fr.md

@ -12,7 +12,6 @@ L'arbre en résultant devra toujours suivre les règles des arbres de recherche
func BTreeDeleteNode(root, node *TreeNode) *TreeNode {
}
```
### Utilisation
@ -44,8 +43,8 @@ func main() {
Et son résultat :
```console
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
Before delete:
1
4
@ -55,5 +54,5 @@ After delete:
1
5
7
student@ubuntu:~/student/test$
student@ubuntu:~/piscine-go/test$
```

6
subjects/btreeinsertdata.en.md

@ -2,9 +2,9 @@
### Instructions
Write a function that inserts new data in a binary search tree
following the properties of binary search trees.
The nodes must be defined as follows:
Write a function that inserts new data in a binary search tree following the properties of binary search trees.
The nodes must be defined as follows :
### Expected function

5
subjects/btreeinsertdata.fr.md

@ -2,8 +2,9 @@
### Instructions
Écrire une fonction qui insère de la nouvelle data dans un arbre binaire en suivant les propriétés des arbres de recherche binaires.
Les nodes doivent être définies comme ci-dessous:
Écrire une fonction qui insère de la nouvelle donnée dans un arbre binaire en suivant les propriétés des arbres de recherche binaires.
Les nodes doivent être définies comme ci-dessous :
### Fonction attendue

6
subjects/btreeisbinary.en.md

@ -36,8 +36,8 @@ func main() {
And its output :
```console
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
true
student@ubuntu:~/student/test$
student@ubuntu:~/piscine-go/test$
```

6
subjects/btreeisbinary.fr.md

@ -36,8 +36,8 @@ func main() {
Et son résultat :
```console
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
true
student@ubuntu:~/student/test$
student@ubuntu:~/piscine-go/test$
```

6
subjects/btreelevelcount.en.md

@ -37,8 +37,8 @@ func main() {
And its output :
```console
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
3
student@ubuntu:~/student/test$
student@ubuntu:~/piscine-go/test$
```

6
subjects/btreelevelcount.fr.md

@ -37,8 +37,8 @@ func main() {
Et son résultat :
```console
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
3
student@ubuntu:~/student/test$
student@ubuntu:~/piscine-go/test$
```

6
subjects/btreemax.en.md

@ -38,8 +38,8 @@ func main() {
And its output :
```console
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
7
student@ubuntu:~/student/test$
student@ubuntu:~/piscine-go/test$
```

6
subjects/btreemax.fr.md

@ -38,8 +38,8 @@ func main() {
Et son résultat :
```console
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
7
student@ubuntu:~/student/test$
student@ubuntu:~/piscine-go/test$
```

6
subjects/btreemin.en.md

@ -38,8 +38,8 @@ func main() {
And its output :
```console
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
1
student@ubuntu:~/student/test$
student@ubuntu:~/piscine-go/test$
```

6
subjects/btreemin.fr.md

@ -38,8 +38,8 @@ func main() {
Et son résultat :
```console
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
1
student@ubuntu:~/student/test$
student@ubuntu:~/piscine-go/test$
```

6
subjects/btreetransplant.en.md

@ -39,11 +39,11 @@ func main() {
And its output :
```console
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
3
4
5
7
student@ubuntu:~/student/test$
student@ubuntu:~/piscine-go/test$
```

6
subjects/btreetransplant.fr.md

@ -39,11 +39,11 @@ func main() {
Et son résultat :
```console
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
3
4
5
7
student@ubuntu:~/student/test$
student@ubuntu:~/piscine-go/test$
```

2
subjects/capitalizeprog.fr.md

@ -8,7 +8,7 @@
- Si il y a plus d'un argument le programme doit afficher `Too many arguments`.
- Si il n'y a pas d'arguments le programme doit afficher un newline ("`\n`").
- Si il n'y a pas d'arguments le programme doit afficher un retour à la ligne (`'\n'`).
### Utilisation :

9
subjects/cat.en.md

@ -23,15 +23,14 @@ Write a program that has the same behaviour as the system's `cat` command-line.
- The program must be submitted inside a folder named `cat`.
```console
student@ubuntu:~/student/cat$ go build
student@ubuntu:~/student/cat$ ./cat
student@ubuntu:~/piscine-go/cat$ go build
student@ubuntu:~/piscine-go/cat$ ./cat
Hello
Hello
student@ubuntu:~/student/cat$ ./cat quest8.txt
student@ubuntu:~/piscine-go/cat$ ./cat quest8.txt
"Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing
student@ubuntu:~/student/cat$ ./cat quest8.txt quest8T.txt
student@ubuntu:~/piscine-go/cat$ ./cat quest8.txt quest8T.txt
"Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing
"Alan Mathison Turing was an English mathematician, computer scientist, logician, cryptanalyst. Turing was highly influential in the development of theoretical computer science, providing a formalisation of the concepts of algorithm and computation with the Turing machine, which can be considered a model of a general-purpose computer. Turing is widely considered to be the father of theoretical computer science and artificial intelligence."
```

9
subjects/cat.fr.md

@ -25,15 +25,14 @@
### Utilisation:
```console
student@ubuntu:~/student/cat$ go build
student@ubuntu:~/student/cat$ ./cat
student@ubuntu:~/piscine-go/cat$ go build
student@ubuntu:~/piscine-go/cat$ ./cat
Hello
Hello
student@ubuntu:~/student/cat$ ./cat quest8.txt
student@ubuntu:~/piscine-go/cat$ ./cat quest8.txt
"Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing
student@ubuntu:~/student/cat$ ./cat quest8.txt quest8T.txt
student@ubuntu:~/piscine-go/cat$ ./cat quest8.txt quest8T.txt
"Programming is a skill best acquired by pratice and example rather than from books" by Alan Turing
"Alan Mathison Turing was an English mathematician, computer scientist, logician, cryptanalyst. Turing was highly influential in the development of theoretical computer science, providing a formalisation of the concepts of algorithm and computation with the Turing machine, which can be considered a model of a general-purpose computer. Turing is widely considered to be the father of theoretical computer science and artificial intelligence."
```

4
subjects/comcheck.en.md

@ -2,11 +2,11 @@
### Instructions
Write a program `comcheck` that displays on the standard output `Alert!!!` followed by newline(`'\n'`) if at least one of the arguments passed in parameter matches the `strings`:
Write a program `comcheck` that displays on the standard output `Alert!!!` followed by newline (`'\n'`) if at least one of the arguments passed in parameter matches the `string`:
- `01`, `galaxy` or `galaxy 01`.
- If none of the parameters match, the program displays a newline(`'\n'`).
- If none of the parameters match, the program displays a newline (`'\n'`).
### Usage

4
subjects/comcheck.fr.md

@ -2,11 +2,11 @@
### Instructions
écrire un programme `comcheck` qui affiche sur la sortie standard `Alert!!!` suivi d'un newline(`'\n'`) si au moins un des arguments passé ne paramètre correspond aux `strings`:
écrire un programme `comcheck` qui affiche sur la sortie standard `Alert!!!` suivi d'un retour à la ligne (`'\n'`) si au moins un des arguments passé ne paramètre correspond aux `string`:
- `01`, `galaxy` ou `galaxy 01`.
- si aucun des paramètres correspond, le programme affiche un newline(`'\n'`).
- si aucun des paramètres correspond, le programme affiche un retour à la ligne (`'\n'`).
### Usage

2
subjects/compact.fr.md

@ -2,7 +2,7 @@
### Instructions
Écrire une fonction `Compact` qui prend un pointeur sur slice de `strings` comme paramètre.
Écrire une fonction `Compact` qui prend un pointeur sur slice de `string` comme paramètre.
Cette fonction doit:
- Retourner le nombre d'éléments avec des valeurs non-`nil`

2
subjects/compareprog.en.md

@ -4,7 +4,7 @@
Write a program that behaves like the `Compare` function.
This program prints a number after comparing two `strings` lexicographically.
This program prints a number after comparing two `string` lexicographically.
### Usage :

2
subjects/compareprog.fr.md

@ -4,7 +4,7 @@
Écrire un programme qui se comporte comme la fonction `Compare`.
Ce programme affiche un nombre après avoir comparé deux `strings` lexicalement.
Ce programme affiche un nombre après avoir comparé deux `string` lexicalement.
### Utilisation :

1
subjects/concatparams.fr.md

@ -10,6 +10,7 @@ Les arguments doivent être **séparés** par un `\n`.
```go
func ConcatParams(args []string) string {
}
```

1
subjects/convertbase.en.md

@ -12,6 +12,7 @@ Negative numbers will not be tested.
```go
func ConvertBase(nbr, baseFrom, baseTo string) string {
}
```

1
subjects/convertbase.fr.md

@ -12,6 +12,7 @@ Les nombres négatifs ne seront pas testés.
```go
func ConvertBase(nbr, baseFrom, baseTo string) string {
}
```

3
subjects/countdown.en.md

@ -2,8 +2,7 @@
### Instructions
Write a program that displays all digits in descending order, followed by a
newline(`'\n'`).
Write a program that displays all digits in descending order, followed by a newline (`'\n'`).
### Usage

2
subjects/countdown.fr.md

@ -2,7 +2,7 @@
### Instructions
Écrire un programme qui affiche les chiffres dans l'ordre décroissant sur une seule ligne, suivi par un newline(`'\n'`).
Écrire un programme qui affiche les chiffres dans l'ordre décroissant sur une seule ligne, suivi par un retour à la ligne (`'\n'`).
### Utilisation

1
subjects/countif.en.md

@ -8,6 +8,7 @@ Write a function `CountIf` that returns the number of elements of a `string` arr
```go
func CountIf(f func(string) bool, tab []string) int {
}
```

1
subjects/countif.fr.md

@ -8,6 +8,7 @@
```go
func CountIf(f func(string) bool, tab []string) int {
}
```

6
subjects/displaya.en.md

@ -3,9 +3,9 @@
### Instructions
Write a program that takes a `string`, and displays the first `a` character it
encounters in it, followed by a newline(`'\n'`). If there are no `a` characters in the
string, the program just writes `a` followed by a newline(`'\n'`). If the number of parameters is not
1, the program displays an `a` followed by a newline(`'\n'`).
encounters in it, followed by a newline (`'\n'`). If there are no `a` characters in the
string, the program just writes `a` followed by a newline (`'\n'`). If the number of parameters is not
1, the program displays an `a` followed by a newline (`'\n'`).
### Usage

2
subjects/displaya.fr.md

@ -2,7 +2,7 @@
### Instructions
Écrire un programme qui prend une `string`, et qui affiche le premier caractère `a` qu'il trouve dedans, suivi par un newline(`'\n'`). Si il n'y a pas de caractère `a` dans la `string`, le programme affiche juste un `a` suivi d'un newline(`'\n'`). Si le nombre de paramètres n'est pas 1, le programme affiche un `a` suivi d'un newline(`'\n'`).
Écrire un programme qui prend une `string`, et qui affiche le premier caractère `a` qu'il trouve dedans, suivi par un retour à la ligne (`'\n'`). Si il n'y a pas de caractère `a` dans la `string`, le programme affiche juste un `a` suivi d'un retour à la ligne (`'\n'`). Si le nombre de paramètres n'est pas 1, le programme affiche un `a` suivi d'un retour à la ligne (`'\n'`).
### Utilisation

8
subjects/displayalpham.en.md

@ -3,13 +3,13 @@
### Instructions
Write a program that displays the alphabet, with even letters in uppercase, and
odd letters in lowercase, followed by a newline(`'\n'`).
odd letters in lowercase, followed by a newline (`'\n'`).
### Usage
```console
student@ubuntu:~/student/displayalpham$ go build
student@ubuntu:~/student/displayalpham$ ./displayalpham | cat -e
student@ubuntu:~/piscine-go/displayalpham$ go build
student@ubuntu:~/piscine-go/displayalpham$ ./displayalpham | cat -e
aBcDeFgHiJkLmNoPqRsTuVwXyZ$
student@ubuntu:~/student/displayalpham$
student@ubuntu:~/piscine-go/displayalpham$
```

8
subjects/displayalpham.fr.md

@ -2,13 +2,13 @@
### Instructions
Écrire un programme qui affiche l'alphabet, avec les lettres paires en majuscule, et les lettres impaires en minuscule, suivi d'un newline(`'\n'`).
Écrire un programme qui affiche l'alphabet, avec les lettres paires en majuscule, et les lettres impaires en minuscule, suivi d'un retour à la ligne (`'\n'`).
### Utilisation
```console
student@ubuntu:~/student/displayalpham$ go build
student@ubuntu:~/student/displayalpham$ ./displayalpham | cat -e
student@ubuntu:~/piscine-go/displayalpham$ go build
student@ubuntu:~/piscine-go/displayalpham$ ./displayalpham | cat -e
aBcDeFgHiJkLmNoPqRsTuVwXyZ$
student@ubuntu:~/student/displayalpham$
student@ubuntu:~/piscine-go/displayalpham$
```

8
subjects/displayalrevm.en.md

@ -3,13 +3,13 @@
### Instructions
Write a program that displays the alphabet in reverse, with even letters in
uppercase, and odd letters in lowercase, followed by a newline(`'\n'`).
uppercase, and odd letters in lowercase, followed by a newline (`'\n'`).
### Usage
```console
student@ubuntu:~/student/displayalrevm$ go build
student@ubuntu:~/student/displayalrevm$ ./displayalrevm | cat -e
student@ubuntu:~/piscine-go/displayalrevm$ go build
student@ubuntu:~/piscine-go/displayalrevm$ ./displayalrevm | cat -e
zYxWvUtSrQpOnMlKjIhGfEdCbA$
student@ubuntu:~/student/displayalrevm$
student@ubuntu:~/piscine-go/displayalrevm$
```

8
subjects/displayalrevm.fr.md

@ -2,13 +2,13 @@
### Instructions
Écrire un programme qui affiche l'alphabet à l'envers, avec les lettres paires en majuscule, et les lettres impaires en minuscule, suivi d'un newline(`'\n'`).
Écrire un programme qui affiche l'alphabet à l'envers, avec les lettres paires en majuscule, et les lettres impaires en minuscule, suivi d'un retour à la ligne (`'\n'`).
### Utilisation
```console
student@ubuntu:~/student/displayalrevm$ go build
student@ubuntu:~/student/displayalrevm$ ./displayalrevm | cat -e
student@ubuntu:~/piscine-go/displayalrevm$ go build
student@ubuntu:~/piscine-go/displayalrevm$ ./displayalrevm | cat -e
zYxWvUtSrQpOnMlKjIhGfEdCbA$
student@ubuntu:~/student/displayalrevm$
student@ubuntu:~/piscine-go/displayalrevm$
```

8
subjects/displayfile.en.md

@ -15,11 +15,11 @@ Write a program that displays, on the standard output, the content of a file giv
### Usage :
```console
student@ubuntu:~/student/displayfile$ go build
student@ubuntu:~/student/displayfile$ ./displayfile
student@ubuntu:~/piscine-go/displayfile$ go build
student@ubuntu:~/piscine-go/displayfile$ ./displayfile
File name missing
student@ubuntu:~/student/displayfile$ ./displayfile quest8.txt main.go
student@ubuntu:~/piscine-go/displayfile$ ./displayfile quest8.txt main.go
Too many arguments
student@ubuntu:~/student/displayfile$ ./displayfile quest8.txt
student@ubuntu:~/piscine-go/displayfile$ ./displayfile quest8.txt
Almost there!!
```

8
subjects/displayfile.fr.md

@ -15,11 +15,11 @@
### Utilisation:
```console
student@ubuntu:~/student/test$ go build
student@ubuntu:~/student/test$ ./test
student@ubuntu:~/piscine-go/test$ go build
student@ubuntu:~/piscine-go/test$ ./test
File name missing
student@ubuntu:~/student/test$ ./test quest8.txt main.go
student@ubuntu:~/piscine-go/test$ ./test quest8.txt main.go
Too many arguments
student@ubuntu:~/student/test$ ./test quest8.txt
student@ubuntu:~/piscine-go/test$ ./test quest8.txt
Almost there!!
```

2
subjects/displayfirstparam.en.md

@ -2,7 +2,7 @@
### Instructions
Write a program that takes `strings` as arguments, and displays its first argument.
Write a program that takes `string` as arguments, and displays its first argument.
### Usage

2
subjects/displayfirstparam.fr.md

@ -2,7 +2,7 @@
### Instructions
Écrire un programme qui prend des `strings` comme arguments, et qui affiche le premier argument.
Écrire un programme qui prend des `string` comme arguments, et qui affiche le premier argument.
### Utilisation

2
subjects/displaylastparam.en.md

@ -2,7 +2,7 @@
### Instructions
Write a program that takes `strings` as arguments, and displays its last argument.
Write a program that takes `string` as arguments, and displays its last argument.
### Expected output

2
subjects/displaylastparam.fr.md

@ -2,7 +2,7 @@
### Instructions
Écrire un programme qui prend des `strings` comme arguments, et qui affiche le dernier argument.
Écrire un programme qui prend des `string` comme arguments, et qui affiche le dernier argument.
### Expected output

5
subjects/displayz.en.md

@ -2,10 +2,7 @@
### Instructions
Write a program that takes a `string`, and displays the first `z` character it
encounters in it, followed by a newline(`'\n'`). If there are no `z` characters in the
string, the program just writes `z` followed by a newline(`'\n'`). If the number of parameters is not
1, the program displays an `z` followed by a newline(`'\n'`).
Write a program that takes a `string`, and displays the first `z` character it encounters in it, followed by a newline (`'\n'`). If there are no `z` characters in the string, the program just writes `z` followed by a newline (`'\n'`). If the number of parameters is not 1, the program displays an `z` followed by a newline (`'\n'`).
### Usage

2
subjects/displayz.fr.md

@ -2,7 +2,7 @@
### Instructions
Écrire un programme qui prend une `string`, et qui affiche le premier caractère `z` qu'il trouve dedans, suivi par un newline(`'\n'`). Si il n'y a pas de caractère `z` dans la `string`, le programme affiche juste un `z` suivi d'un newline(`'\n'`). Si le nombre de paramètres n'est pas 1, le programme affiche un `z` suivi d'un newline(`'\n'`).
Écrire un programme qui prend une `string`, et qui affiche le premier caractère `z` qu'il trouve dedans, suivi par un retour à la ligne (`'\n'`). Si il n'y a pas de caractère `z` dans la `string`, le programme affiche juste un `z` suivi d'un retour à la ligne (`'\n'`). Si le nombre de paramètres n'est pas 1, le programme affiche un `z` suivi d'un retour à la ligne (`'\n'`).
### Utilisation

14
subjects/expandstr.en.md

@ -5,7 +5,7 @@
Write a program that takes a `string` and displays it with exactly three spaces
between each word, with no spaces or tabs at either the beginning nor the end.
The `string` will be followed by a newline(`'\n'`).
The `string` will be followed by a newline (`'\n'`).
A word is a sequence of alphanumerical characters.
@ -15,14 +15,14 @@ a newline.
### Usage
```console
student@ubuntu:~/student/expandstr$ go build
student@ubuntu:~/student/expandstr$ ./expandstr "you see it's easy to display the same thing" | cat -e
student@ubuntu:~/piscine-go/expandstr$ go build
student@ubuntu:~/piscine-go/expandstr$ ./expandstr "you see it's easy to display the same thing" | cat -e
you see it's easy to display the same thing$
student@ubuntu:~/student/expandstr$ ./expandstr " only it's harder " | cat -e
student@ubuntu:~/piscine-go/expandstr$ ./expandstr " only it's harder " | cat -e
only it's harder$
student@ubuntu:~/student/expandstr$ ./expandstr " how funny it is" "did you hear, Mathilde ?" | cat -e
student@ubuntu:~/piscine-go/expandstr$ ./expandstr " how funny it is" "did you hear, Mathilde ?" | cat -e
$
student@ubuntu:~/student/expandstr$ ./expandstr | cat -e
student@ubuntu:~/piscine-go/expandstr$ ./expandstr | cat -e
$
student@ubuntu:~/student/expandstr$
student@ubuntu:~/piscine-go/expandstr$
```

16
subjects/expandstr.fr.md

@ -4,23 +4,23 @@
Écrire un programme qui prend une `string` et qui l'affiche avec exactement 3 espaces entre chaque mot, sans espace ou tabulation ni au début ni à la fin.
La `string` sera suivie d'un newline(`'\n'`).
La `string` sera suivie d'un retour à la ligne (`'\n'`).
Un mot est une suite de caractères alphanumériques.
Si le nombre de paramètres n'est pas 1, ou si il n'y a pas de mot, le programme affiche un newline.
Si le nombre de paramètres n'est pas 1, ou si il n'y a pas de mot, le programme affiche un retour à la ligne.
### Utilisation
```console
student@ubuntu:~/student/expandstr$ go build
student@ubuntu:~/student/expandstr$ ./expandstr "you see it's easy to display the same thing" | cat -e
student@ubuntu:~/piscine-go/expandstr$ go build
student@ubuntu:~/piscine-go/expandstr$ ./expandstr "you see it's easy to display the same thing" | cat -e
you see it's easy to display the same thing$
student@ubuntu:~/student/expandstr$ ./expandstr " only it's harder " | cat -e
student@ubuntu:~/piscine-go/expandstr$ ./expandstr " only it's harder " | cat -e
only it's harder$
student@ubuntu:~/student/expandstr$ ./expandstr " how funny it is" "did you hear, Mathilde ?" | cat -e
student@ubuntu:~/piscine-go/expandstr$ ./expandstr " how funny it is" "did you hear, Mathilde ?" | cat -e
$
student@ubuntu:~/student/expandstr$ ./expandstr | cat -e
student@ubuntu:~/piscine-go/expandstr$ ./expandstr | cat -e
$
student@ubuntu:~/student/expandstr$
student@ubuntu:~/piscine-go/expandstr$
```

1
subjects/fibonacci.fr.md

@ -47,5 +47,4 @@ student@ubuntu:~/piscine-go/test$go build
student@ubuntu:~/piscine-go/test$ ./test
3
student@ubuntu:~/piscine-go/test$
```

6
subjects/firstword.en.md

@ -2,13 +2,13 @@
### Instructions
Write a program that takes a `string` and displays its first word, followed by a newline(`'\n'`).
Write a program that takes a `string` and displays its first word, followed by a newline (`'\n'`).
- A word is a section of `string` delimited by spaces or by the start/end of the `string`.
- The output will be followed by a newline(`'\n'`).
- The output will be followed by a newline (`'\n'`).
- If the number of parameters is not 1, or if there are no words, the program displays a newline(`'\n'`).
- If the number of parameters is not 1, or if there are no words, the program displays a newline (`'\n'`).
### Usage

6
subjects/firstword.fr.md

@ -2,13 +2,13 @@
### Instructions
Écrire un programme qui prend une `string` et qui affiche son premier mot, suivi d'un newline(`'\n'`).
Écrire un programme qui prend une `string` et qui affiche son premier mot, suivi d'un retour à la ligne (`'\n'`).
- Un mot est une section de `string` délimité par des espace ou par le début/fin d'une `string`.
- L'output sera suivi d'un newline(`'\n'`).
- L'output sera suivi d'un retour à la ligne (`'\n'`).
- Si le nombre de paramètres n'est pas 1, ou si il n'y a pas de mots, le programme affiche un newline(`'\n'`).
- Si le nombre de paramètres n'est pas 1, ou si il n'y a pas de mots, le programme affiche un retour à la ligne (`'\n'`).
### Utilisation

1
subjects/foreach.en.md

@ -8,6 +8,7 @@ Write a function `ForEach` that, for an `int` array, applies a function on each
```go
func ForEach(f func(int), arr []int) {
}
```

1
subjects/foreach.fr.md

@ -8,6 +8,7 @@
```go
func ForEach(f func(int), arr []int) {
}
```

2
subjects/fprime.en.md

@ -2,7 +2,7 @@
### Instructions
Write a program that takes a positive `int` and displays its prime factors, followed by a newline(`'\n'`).
Write a program that takes a positive `int` and displays its prime factors, followed by a newline (`'\n'`).
- Factors must be displayed in ascending order and separated by `*`.

4
subjects/fprime.fr.md

@ -2,11 +2,11 @@
### Instructions
Écrire un programme qui prend un `int` positif et qui affiche ses facteurs premiers sur la sortie standard, suivi d'un newline(`'\n'`).
Écrire un programme qui prend un `int` positif et qui affiche ses facteurs premiers sur la sortie standard, suivi d'un retour à la ligne (`'\n'`).
- Les facteurs doivent être affichés en ordre croissant et séparés par `*`.
- Si le nombre de paramètres est différent de 1, le programme affiche un newline.
- Si le nombre de paramètres est différent de 1, le programme affiche un retour à la ligne.
- L'input (l'entrée), quand il y en a un, sera toujours valide.

21
subjects/gcd.en.md

@ -2,10 +2,9 @@
### Instructions
Write a program that takes two `strings` representing two strictly positive
integers that fit in an `int`.
Write a program that takes two `string` representing two strictly positive integers that fit in an `int`.
The program displays their greatest common divisor followed by a newline('`\n`').
The program displays their greatest common divisor followed by a newline (`'\n'`).
If the number of parameters is different from 2, the program displays a newline.
@ -14,18 +13,18 @@ All arguments tested will be positive `int` values.
### Usage
```console
student@ubuntu:~/student/gcd$ go build
student@ubuntu:~/student/gcd$ ./gcd 42 10 | cat -e
student@ubuntu:~/piscine-go/gcd$ go build
student@ubuntu:~/piscine-go/gcd$ ./gcd 42 10 | cat -e
2$
student@ubuntu:~/student/gcd$ ./gcd 42 12 | cat -e
student@ubuntu:~/piscine-go/gcd$ ./gcd 42 12 | cat -e
6$
student@ubuntu:~/student/gcd$ ./gcd 14 77 | cat -e
student@ubuntu:~/piscine-go/gcd$ ./gcd 14 77 | cat -e
7$
student@ubuntu:~/student/gcd$ ./gcd 17 3 | cat -e
student@ubuntu:~/piscine-go/gcd$ ./gcd 17 3 | cat -e
1$
student@ubuntu:~/student/gcd$ ./gcd | cat -e
student@ubuntu:~/piscine-go/gcd$ ./gcd | cat -e
$
student@ubuntu:~/student/gcd$ ./gcd 50 12 4 | cat -e
student@ubuntu:~/piscine-go/gcd$ ./gcd 50 12 4 | cat -e
$
student@ubuntu:~/student/gcd$
student@ubuntu:~/piscine-go/gcd$
```

22
subjects/gcd.fr.md

@ -2,29 +2,29 @@
### Instructions
Écrire un programme qui prend deux `strings` représentant deux entiers strictement positifs qui rentrent dans un `int`.
Écrire un programme qui prend deux `string` représentant deux entiers strictement positifs qui rentrent dans un `int`.
Afficher leur plus grand diviseur commun suivi d'un newline('`\n`').
Afficher leur plus grand diviseur commun suivi d'un retour à la ligne (`'\n'`).
Si le nombre de paramètres est différent de 2, le programme affiche un newline.
Si le nombre de paramètres est différent de 2, le programme affiche un retour à la ligne.
Tous les arguments testés seront des `int` positifs.
### Utilisation
```console
student@ubuntu:~/student/gcd$ go build
student@ubuntu:~/student/gcd$ ./gcd 42 10 | cat -e
student@ubuntu:~/piscine-go/gcd$ go build
student@ubuntu:~/piscine-go/gcd$ ./gcd 42 10 | cat -e
2$
student@ubuntu:~/student/gcd$ ./gcd 42 12 | cat -e
student@ubuntu:~/piscine-go/gcd$ ./gcd 42 12 | cat -e
6$
student@ubuntu:~/student/gcd$ ./gcd 14 77 | cat -e
student@ubuntu:~/piscine-go/gcd$ ./gcd 14 77 | cat -e
7$
student@ubuntu:~/student/gcd$ ./gcd 17 3 | cat -e
student@ubuntu:~/piscine-go/gcd$ ./gcd 17 3 | cat -e
1$
student@ubuntu:~/student/gcd$ ./gcd | cat -e
student@ubuntu:~/piscine-go/gcd$ ./gcd | cat -e
$
student@ubuntu:~/student/gcd$ ./gcd 50 12 4 | cat -e
student@ubuntu:~/piscine-go/gcd$ ./gcd 50 12 4 | cat -e
$
student@ubuntu:~/student/gcd$
student@ubuntu:~/piscine-go/gcd$
```

2
subjects/hello.en.md

@ -2,7 +2,7 @@
### Instructions
Write a program that displays "Hello World!" followed by a newline(`'\n'`).
Write a program that displays "Hello World!" followed by a newline (`'\n'`).
### Usage

2
subjects/hello.fr.md

@ -2,7 +2,7 @@
### Instructions
Écrire un programme qui affiche "Hello World!" suivi d'un newline(`'\n'`).
Écrire un programme qui affiche "Hello World!" suivi d'un retour à la ligne (`'\n'`).
### Utilisation

18
subjects/hiddenp.en.md

@ -2,11 +2,9 @@
### Instructions
Write a program named `hiddenp` that takes two `strings` and that, if the first `string` is hidden in the second one, displays `1`
followed by a newline(`'\n'`), otherwise it displays `0` followed by a newline.
Write a program named `hiddenp` that takes two `string` and that, if the first `string` is hidden in the second one, displays `1` followed by a newline (`'\n'`), otherwise it displays `0` followed by a newline.
Let s1 and s2 be `strings`. It is considered that s1 is hidden in s2 if it is possible to
find each character from s1 in s2, **in the same order as they appear in s1.**
Let s1 and s2 be `string`. It is considered that s1 is hidden in s2 if it is possible to find each character from s1 in s2, **in the same order as they appear in s1.**
If s1 is an empty `string` it is considered hidden in any `string`.
@ -15,14 +13,14 @@ If the number of parameters is different from 2, the program displays a newline.
### Usage
```console
student@ubuntu:~/student/hiddenp$ go build
student@ubuntu:~/student/hiddenp$ ./hiddenp "fgex.;" "tyf34gdgf;'ektufjhgdgex.;.;rtjynur6" | cat -e
student@ubuntu:~/piscine-go/hiddenp$ go build
student@ubuntu:~/piscine-go/hiddenp$ ./hiddenp "fgex.;" "tyf34gdgf;'ektufjhgdgex.;.;rtjynur6" | cat -e
1$
student@ubuntu:~/student/hiddenp$ ./hiddenp "abc" "2altrb53c.sse" | cat -e
student@ubuntu:~/piscine-go/hiddenp$ ./hiddenp "abc" "2altrb53c.sse" | cat -e
1$
student@ubuntu:~/student/hiddenp$ ./hiddenp "abc" "btarc" | cat -e
student@ubuntu:~/piscine-go/hiddenp$ ./hiddenp "abc" "btarc" | cat -e
0$
student@ubuntu:~/student/hiddenp$ ./hiddenp | cat -e
student@ubuntu:~/piscine-go/hiddenp$ ./hiddenp | cat -e
$
student@ubuntu:~/student/hiddenp$
student@ubuntu:~/piscine-go/hiddenp$
```

19
subjects/hiddenp.fr.md

@ -2,26 +2,25 @@
### Instructions
Écrire un programme nommé `hiddenp` qui prend deux `strings` et qui, si la première `string` est cachée dans la deuxième, affiche `1`
suivi d'un newline(`'\n'`), autrement il affiche `0` suivi d'un newline.
Écrire un programme nommé `hiddenp` qui prend deux `string` et qui, si la première `string` est cachée dans la deuxième, affiche `1` suivi d'un retour à la ligne (`'\n'`), autrement il affiche `0` suivi d'un retour à la ligne.
Considérons s1 et s2 comme étant des `strings`. Il est considéré que s1 est cachée dans s2 si il est possbile de trouver chaque caractère de s1 dans s2, **dans le même ordre d'apparence que s1.**
Considérons s1 et s2 comme étant des `string`. Il est considéré que s1 est cachée dans s2 si il est possbile de trouver chaque caractère de s1 dans s2, **dans le même ordre d'apparence que s1.**
Si s1 est une `string` vide elle est considérée cachée dans n'importe quelle `string`.
Si le nombre de paramètres est différent de 2, le programme affiche un newline.
Si le nombre de paramètres est différent de 2, le programme affiche un retour à la ligne.
### Utilisation
```console
student@ubuntu:~/student/hiddenp$ go build
student@ubuntu:~/student/hiddenp$ ./hiddenp "fgex.;" "tyf34gdgf;'ektufjhgdgex.;.;rtjynur6" | cat -e
student@ubuntu:~/piscine-go/hiddenp$ go build
student@ubuntu:~/piscine-go/hiddenp$ ./hiddenp "fgex.;" "tyf34gdgf;'ektufjhgdgex.;.;rtjynur6" | cat -e
1$
student@ubuntu:~/student/hiddenp$ ./hiddenp "abc" "2altrb53c.sse" | cat -e
student@ubuntu:~/piscine-go/hiddenp$ ./hiddenp "abc" "2altrb53c.sse" | cat -e
1$
student@ubuntu:~/student/hiddenp$ ./hiddenp "abc" "btarc" | cat -e
student@ubuntu:~/piscine-go/hiddenp$ ./hiddenp "abc" "btarc" | cat -e
0$
student@ubuntu:~/student/hiddenp$ ./hiddenp | cat -e
student@ubuntu:~/piscine-go/hiddenp$ ./hiddenp | cat -e
$
student@ubuntu:~/student/hiddenp$
student@ubuntu:~/piscine-go/hiddenp$
```

6
subjects/inter.en.md

@ -2,11 +2,11 @@
### Instructions
Write a program that takes two `strings` and displays, without doubles, the characters that appear in both `strings`, in the order they appear in the first one.
Write a program that takes two `string` and displays, without doubles, the characters that appear in both `string`, in the order they appear in the first one.
- The display will be followed by a newline(`'\n'`).
- The display will be followed by a newline (`'\n'`).
- If the number of arguments is different from 2, the program displays a newline(`'\n'`).
- If the number of arguments is different from 2, the program displays a newline (`'\n'`).
### Usage

6
subjects/inter.fr.md

@ -2,11 +2,11 @@
### Instructions
Écrire un programme qui prend deux `strings` et qui affiche, sans doublons, les caractères qui apparaissent dans les deux `strings`, dans l'ordre dans lequel ils apparaissent dans la première.
Écrire un programme qui prend deux `string` et qui affiche, sans doublons, les caractères qui apparaissent dans les deux `string`, dans l'ordre dans lequel ils apparaissent dans la première.
- L'affichage sera suivi d'un newline(`'\n'`).
- L'affichage sera suivi d'un retour à la ligne (`'\n'`).
- Si le nombre d'arguments est différent de 2, le programme affiche un newline(`'\n'`).
- Si le nombre d'arguments est différent de 2, le programme affiche un retour à la ligne (`'\n'`).
### Utilisation

2
subjects/ispowerof2.fr.md

@ -6,7 +6,7 @@
Ce programme doit afficher `true` si le nombre donné est une puissance de 2, autrement il affiche `false`.
- Si il y a plus d'un ou aucun argument le programme doit afficher un newline ("`\n`").
- Si il y a plus d'un ou aucun argument le programme doit afficher un retour à la ligne (`'\n'`).
- Les cas d'erreurs doivent être gérés.

1
subjects/issorted.en.md

@ -13,6 +13,7 @@ To do your testing you have to write your own `f` function.
```go
func IsSorted(f func(a, b int) int, tab []int) bool {
}
```

1
subjects/issorted.fr.md

@ -12,6 +12,7 @@ Pour faire vos tests, vous devez coder votre propre fonction `f`.
```go
func IsSorted(f func(a, b int) int, tab []int) bool {
}
```

20
subjects/lastword.en.md

@ -2,27 +2,27 @@
### Instructions
Write a program that takes a `string` and displays its last word, followed by a newline(`'\n'`).
Write a program that takes a `string` and displays its last word, followed by a newline (`'\n'`).
- A word is a section of `string` delimited by spaces or by the start/end of the `string`.
- The output will be followed by a newline(`'\n'`).
- The output will be followed by a newline (`'\n'`).
- If the number of parameters is different from 1, or if there are no word, the program displays a newline(`'\n'`).
- If the number of parameters is different from 1, or if there are no word, the program displays a newline (`'\n'`).
### Usage
```console
student@ubuntu:~/student/lastword$ go build
student@ubuntu:~/student/lastword$ ./lastword "FOR PONY" | cat -e
student@ubuntu:~/piscine-go/lastword$ go build
student@ubuntu:~/piscine-go/lastword$ ./lastword "FOR PONY" | cat -e
PONY$
student@ubuntu:~/student/lastword$ ./lastword "this ... is sparta, then again, maybe not" | cat -e
student@ubuntu:~/piscine-go/lastword$ ./lastword "this ... is sparta, then again, maybe not" | cat -e
not$
student@ubuntu:~/student/lastword$ ./lastword " " | cat -e
student@ubuntu:~/piscine-go/lastword$ ./lastword " " | cat -e
$
student@ubuntu:~/student/lastword$ ./lastword "a" "b" | cat -e
student@ubuntu:~/piscine-go/lastword$ ./lastword "a" "b" | cat -e
$
student@ubuntu:~/student/lastword$ ./lastword " lorem,ipsum " | cat -e
student@ubuntu:~/piscine-go/lastword$ ./lastword " lorem,ipsum " | cat -e
lorem,ipsum$
student@ubuntu:~/student/lastword$
student@ubuntu:~/piscine-go/lastword$
```

20
subjects/lastword.fr.md

@ -2,27 +2,27 @@
### Instructions
Écrire un programme qui prend une `string` et qui affiche son dernier mot, suivi d'un newline(`'\n'`).
Écrire un programme qui prend une `string` et qui affiche son dernier mot, suivi d'un retour à la ligne (`'\n'`).
- Un mot est une section de `string` délimitée par des espaces ou par le début/fin d'une `string`.
- L'output sera suivi d'un newline(`'\n'`).
- L'output sera suivi d'un retour à la ligne (`'\n'`).
- Si le nombre de paramètres est différent de 1, ou si il n'y a pas de mot, le programme affiche un newline(`'\n'`).
- Si le nombre de paramètres est différent de 1, ou si il n'y a pas de mot, le programme affiche un retour à la ligne (`'\n'`).
### Utilisation
```console
student@ubuntu:~/student/lastword$ go build
student@ubuntu:~/student/lastword$ ./lastword "FOR PONY" | cat -e
student@ubuntu:~/piscine-go/lastword$ go build
student@ubuntu:~/piscine-go/lastword$ ./lastword "FOR PONY" | cat -e
PONY$
student@ubuntu:~/student/lastword$ ./lastword "this ... is sparta, then again, maybe not" | cat -e
student@ubuntu:~/piscine-go/lastword$ ./lastword "this ... is sparta, then again, maybe not" | cat -e
not$
student@ubuntu:~/student/lastword$ ./lastword " " | cat -e
student@ubuntu:~/piscine-go/lastword$ ./lastword " " | cat -e
$
student@ubuntu:~/student/lastword$ ./lastword "a" "b" | cat -e
student@ubuntu:~/piscine-go/lastword$ ./lastword "a" "b" | cat -e
$
student@ubuntu:~/student/lastword$ ./lastword " lorem,ipsum " | cat -e
student@ubuntu:~/piscine-go/lastword$ ./lastword " lorem,ipsum " | cat -e
lorem,ipsum$
student@ubuntu:~/student/lastword$
student@ubuntu:~/piscine-go/lastword$
```

1
subjects/listat.en.md

@ -44,7 +44,6 @@ func main() {
fmt.Println(piscine.ListAt(link.Head, 1).Data)
fmt.Println(piscine.ListAt(link.Head, 7))
}
```
And its output :

1
subjects/listat.fr.md

@ -44,7 +44,6 @@ func main() {
fmt.Println(piscine.ListAt(link.Head, 1).Data)
fmt.Println(piscine.ListAt(link.Head, 7))
}
```
Et son résultat :

2
subjects/listclear.en.md

@ -10,6 +10,7 @@ Write a function `ListClear` that deletes all `nodes` from a linked list `l`.
```go
func ListClear(l *List) {
}
```
@ -52,7 +53,6 @@ func main() {
fmt.Println("------updated list------")
PrintList(link)
}
```
And its output :

2
subjects/listclear.fr.md

@ -10,6 +10,7 @@
```go
func ListClear(l *List) {
}
```
@ -52,7 +53,6 @@ func main() {
fmt.Println("------updated list------")
PrintList(link)
}
```
Et son résultat :

2
subjects/listlast.en.md

@ -18,6 +18,7 @@ type List struct {
}
func ListLast(l *List) interface{} {
}
```
@ -45,7 +46,6 @@ func main() {
fmt.Println(piscine.ListLast(link))
fmt.Println(piscine.ListLast(link2))
}
```
And its output :

2
subjects/listlast.fr.md

@ -18,6 +18,7 @@ type List struct {
}
func ListLast(l *List) interface{} {
}
```
@ -45,7 +46,6 @@ func main() {
fmt.Println(piscine.ListLast(link))
fmt.Println(piscine.ListLast(link2))
}
```
Et son résultat :

1
subjects/listpushback.en.md

@ -18,6 +18,7 @@ type List struct {
}
func ListPushBack(l *List, data interface{}) {
}
```

Some files were not shown because too many files changed in this diff diff.show_more

Loading…
Cancel
Save