|
|
@ -1,10 +1,10 @@ |
|
|
|
## quadChecker |
|
|
|
## quadchecker |
|
|
|
|
|
|
|
|
|
|
|
### Instructions |
|
|
|
### Instructions |
|
|
|
|
|
|
|
|
|
|
|
This raid is based on the `quad` functions. |
|
|
|
This raid is based on the `quad` functions. |
|
|
|
|
|
|
|
|
|
|
|
Create a program `quadChecker` that takes a `string` as an argument and displays the name of the matching `quad` and its dimensions. |
|
|
|
Create a program `quadchecker` that takes a `string` as an argument and displays the name of the matching `quad` and its dimensions. |
|
|
|
|
|
|
|
|
|
|
|
- If the argument is not a `raid` the program should print `Not a Raid function`. |
|
|
|
- If the argument is not a `raid` the program should print `Not a Raid function`. |
|
|
|
|
|
|
|
|
|
|
@ -17,46 +17,46 @@ Create a program `quadChecker` that takes a `string` as an argument and displays |
|
|
|
- If it's `quadA` |
|
|
|
- If it's `quadA` |
|
|
|
|
|
|
|
|
|
|
|
```console |
|
|
|
```console |
|
|
|
student@ubuntu:~/[[ROOT]]/quadChecker$ ls -l |
|
|
|
student@ubuntu:~/[[ROOT]]/quadchecker$ ls -l |
|
|
|
-rw-r--r-- 1 student student nov 23 14:30 main.go |
|
|
|
-rw-r--r-- 1 student student nov 23 14:30 main.go |
|
|
|
-rwxr-xr-x 1 student student nov 23 19:18 quadChecker |
|
|
|
-rwxr-xr-x 1 student student nov 23 19:18 quadchecker |
|
|
|
-rwxr-xr-x 1 student student nov 23 19:50 quadA |
|
|
|
-rwxr-xr-x 1 student student nov 23 19:50 quadA |
|
|
|
-rwxr-xr-x 1 student student nov 23 19:50 quadB |
|
|
|
-rwxr-xr-x 1 student student nov 23 19:50 quadB |
|
|
|
-rwxr-xr-x 1 student student nov 23 19:50 quadC |
|
|
|
-rwxr-xr-x 1 student student nov 23 19:50 quadC |
|
|
|
-rwxr-xr-x 1 student student nov 23 19:50 quadD |
|
|
|
-rwxr-xr-x 1 student student nov 23 19:50 quadD |
|
|
|
-rwxr-xr-x 1 student student nov 23 19:50 quadE |
|
|
|
-rwxr-xr-x 1 student student nov 23 19:50 quadE |
|
|
|
student@ubuntu:~/[[ROOT]]/quadChecker$ ./quadA 3 3 | ./quadChecker |
|
|
|
student@ubuntu:~/[[ROOT]]/quadchecker$ ./quadA 3 3 | ./quadchecker |
|
|
|
[quadA] [3] [3] |
|
|
|
[quadA] [3] [3] |
|
|
|
student@ubuntu:~/[[ROOT]]/quadChecker$ |
|
|
|
student@ubuntu:~/[[ROOT]]/quadchecker$ |
|
|
|
student@ubuntu:~/[[ROOT]]/quadChecker$ |
|
|
|
student@ubuntu:~/[[ROOT]]/quadchecker$ |
|
|
|
student@ubuntu:~/[[ROOT]]/quadChecker$ |
|
|
|
student@ubuntu:~/[[ROOT]]/quadchecker$ |
|
|
|
student@ubuntu:~/[[ROOT]]/quadChecker$ |
|
|
|
student@ubuntu:~/[[ROOT]]/quadchecker$ |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
- If it's `quadC 1 1` : |
|
|
|
- If it's `quadC 1 1` : |
|
|
|
|
|
|
|
|
|
|
|
```console |
|
|
|
```console |
|
|
|
student@ubuntu:~/[[ROOT]]/quadChecker$ ./quadC 1 1 |
|
|
|
student@ubuntu:~/[[ROOT]]/quadchecker$ ./quadC 1 1 |
|
|
|
A |
|
|
|
A |
|
|
|
student@ubuntu:~/[[ROOT]]/quadChecker$ ./quadD 1 1 |
|
|
|
student@ubuntu:~/[[ROOT]]/quadchecker$ ./quadD 1 1 |
|
|
|
A |
|
|
|
A |
|
|
|
student@ubuntu:~/[[ROOT]]/quadChecker$ ./quadE 1 1 |
|
|
|
student@ubuntu:~/[[ROOT]]/quadchecker$ ./quadE 1 1 |
|
|
|
A |
|
|
|
A |
|
|
|
student@ubuntu:~/[[ROOT]]/quadChecker$ ./quadC 1 1 | ./quadChecker |
|
|
|
student@ubuntu:~/[[ROOT]]/quadchecker$ ./quadC 1 1 | ./quadchecker |
|
|
|
[quadC] [1] [1] || [quadD] [1] [1] || [quadE] [1] [1] |
|
|
|
[quadC] [1] [1] || [quadD] [1] [1] || [quadE] [1] [1] |
|
|
|
student@ubuntu:~/[[ROOT]]/quadChecker$ |
|
|
|
student@ubuntu:~/[[ROOT]]/quadchecker$ |
|
|
|
``` |
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
- If it's `quadC 1 2` : |
|
|
|
- If it's `quadC 1 2` : |
|
|
|
|
|
|
|
|
|
|
|
```console |
|
|
|
```console |
|
|
|
student@ubuntu:~/[[ROOT]]/quadChecker$ ./quadE 1 2 |
|
|
|
student@ubuntu:~/[[ROOT]]/quadchecker$ ./quadE 1 2 |
|
|
|
A |
|
|
|
A |
|
|
|
C |
|
|
|
C |
|
|
|
student@ubuntu:~/[[ROOT]]/quadChecker$ ./quadC 1 2 |
|
|
|
student@ubuntu:~/[[ROOT]]/quadchecker$ ./quadC 1 2 |
|
|
|
A |
|
|
|
A |
|
|
|
C |
|
|
|
C |
|
|
|
student@ubuntu:~/[[ROOT]]/quadChecker$ ./quadE 1 2 | ./quadChecker |
|
|
|
student@ubuntu:~/[[ROOT]]/quadchecker$ ./quadE 1 2 | ./quadchecker |
|
|
|
[quadC] [1] [2] || [quadE] [1] [2] |
|
|
|
[quadC] [1] [2] || [quadE] [1] [2] |
|
|
|
student@ubuntu:~/[[ROOT]]/quadChecker$ |
|
|
|
student@ubuntu:~/[[ROOT]]/quadchecker$ |
|
|
|
``` |
|
|
|
``` |
|
|
|