You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
## raid3
|
|
|
|
|
|
|
|
### Instructions
|
|
|
|
|
|
|
|
Ce raid est basé sur les fonctions du `raid1`.
|
|
|
|
|
|
|
|
Créer un programme `raid3` qui prend une `string` comme argument et qui affiche le nom du `raid1` correspondant et ses dimensions.
|
|
|
|
|
|
|
|
- Si l'argument n'est pas un des `raid1` le programme affiche `Not a Raid function`.
|
|
|
|
|
|
|
|
- Toutes les réponses doivent se terminer avec un newline('`\n`').
|
|
|
|
|
|
|
|
- Si il y a plus d'un `raid1` correspondant, le programme doit les afficher tous en ordre alphabétique et séparé par un `|`.
|
|
|
|
|
|
|
|
### Utilisation
|
|
|
|
|
|
|
|
```console
|
|
|
|
student@ubuntu:~/student/test$ go build
|
|
|
|
student@ubuntu:~/student/test$ echo HELLO | ./raid3
|
|
|
|
Not a Raid function
|
|
|
|
student@ubuntu:~/student/test$ ./raid1a 4 4
|
|
|
|
o--o
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
o--o
|
|
|
|
student@ubuntu:~/student/test$ ./raid1a 4 4 | ./raid3
|
|
|
|
[raid1a] [4] [4]
|
|
|
|
student@ubuntu:~/student/test$ ./raid1a 3 4 | ./raid3
|
|
|
|
[raid1a] [3] [4]
|
|
|
|
student@ubuntu:~/student/test$ ./raid1c 1 1
|
|
|
|
A
|
|
|
|
student@ubuntu:~/student/test$ ./raid1d 1 1
|
|
|
|
A
|
|
|
|
student@ubuntu:~/student/test$ ./raid1e 1 1
|
|
|
|
A
|
|
|
|
student@ubuntu:~/student/test$ ./raid1c 1 1 | ./raid3
|
|
|
|
[raid1c] [1] [1] || [raid1d] [1] [1] || [raid1e] [1] [1]
|
|
|
|
student@ubuntu:~/student/test$
|
|
|
|
```
|