2022-03-28 15:26:36 +00:00
|
|
|
## quadrangle
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
### quadA
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
#### Instructions
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2021-10-14 12:02:26 +00:00
|
|
|
Write a function `QuadA` that prints a **valid** rectangle with a given width of `x` and height of `y`.
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
The function must draw the rectangles as in the examples.
|
|
|
|
|
2021-10-27 15:46:30 +00:00
|
|
|
If `x` and `y` are positive numbers, the program should print the rectangles as seen in the examples, otherwise, the function should print nothing.
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2022-04-14 10:29:17 +00:00
|
|
|
Make sure you submit all the necessary files to run the program.
|
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
#### Expected function
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
```go
|
2020-08-06 08:52:09 +00:00
|
|
|
func QuadA(x,y int) {
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
#### Usage
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
Here are possible programs to test your function :
|
|
|
|
|
|
|
|
Program #1
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadA(5,3)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
o---o
|
|
|
|
| |
|
|
|
|
o---o
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Program #2
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadA(5,1)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
o---o
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Program #3
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadA(1,1)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
o
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Program #4
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadA(1,5)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
o
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
o
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
2021-04-27 19:04:54 +00:00
|
|
|
---
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
### quadB
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
#### Instructions
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2020-08-06 08:52:09 +00:00
|
|
|
Write a function `QuadB` that prints a **valid** rectangle of width `x` and of height `y`.
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
The function must draw the rectangles as in the examples.
|
|
|
|
|
2021-10-27 15:46:30 +00:00
|
|
|
If `x` and `y` are positive numbers, the program should print the rectangles as seen in the examples, otherwise, the function should print nothing.
|
2021-10-14 12:02:26 +00:00
|
|
|
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
#### Expected function
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
```go
|
2020-08-06 08:52:09 +00:00
|
|
|
func QuadB(x,y int) {
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
#### Usage
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
Here are possible programs to test your function :
|
|
|
|
|
|
|
|
Program #1
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadB(5,3)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
/***\
|
|
|
|
* *
|
|
|
|
\***/
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Program #2
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadB(5,1)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
/***\
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Program #3
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadB(1,1)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
/
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Program #4
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadB(1,5)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
/
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*
|
|
|
|
\
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
2021-04-27 19:04:54 +00:00
|
|
|
---
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
### quadC
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
#### Instructions
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2020-08-06 08:52:09 +00:00
|
|
|
Write a function `QuadC` that prints a **valid** rectangle of width `x` and of height `y`.
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
The function must draw the rectangles as in the examples.
|
|
|
|
|
2021-10-27 15:46:30 +00:00
|
|
|
If `x` and `y` are positive numbers, the program should print the rectangles as seen in the examples, otherwise, the function should print nothing.
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
#### Expected function
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
```go
|
2020-08-06 08:52:09 +00:00
|
|
|
func QuadC(x,y int) {
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
#### Usage
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
Here are possible programs to test your function :
|
|
|
|
|
|
|
|
Program #1
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadC(5,3)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
ABBBA
|
|
|
|
B B
|
|
|
|
CBBBC
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Program #2
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadC(5,1)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
ABBBA
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Program #3
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadC(1,1)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
A
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Program #4
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadC(1,5)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
A
|
|
|
|
B
|
|
|
|
B
|
|
|
|
B
|
|
|
|
C
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
2021-04-27 19:04:54 +00:00
|
|
|
---
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
### quadD
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
#### Instructions
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2020-08-06 08:52:09 +00:00
|
|
|
Write a function `QuadD` that prints a **valid** rectangle of width `x` and of height `y`.
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
The function must draw the rectangles as in the examples.
|
|
|
|
|
2021-10-27 15:46:30 +00:00
|
|
|
If `x` and `y` are positive numbers, the program should print the rectangles as seen in the examples, otherwise, the function should print nothing.
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
#### Expected function
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
```go
|
2020-08-06 08:52:09 +00:00
|
|
|
func QuadD(x,y int) {
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
#### Usage
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
Here are possible programs to test your function :
|
|
|
|
|
|
|
|
Program #1
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadD(5,3)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
ABBBC
|
|
|
|
B B
|
|
|
|
ABBBC
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Program #2
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadD(5,1)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
ABBBC
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Program #3
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadD(1,1)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
A
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Program #4
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadD(1,5)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
A
|
|
|
|
B
|
|
|
|
B
|
|
|
|
B
|
|
|
|
A
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
2021-04-27 19:04:54 +00:00
|
|
|
---
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
### quadE
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
#### Instructions
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2020-08-06 08:52:09 +00:00
|
|
|
Write a function `QuadE` that prints a **valid** rectangle of width `x` and of height `y`.
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
The function must draw the rectangles as in the examples.
|
|
|
|
|
2021-10-27 15:46:30 +00:00
|
|
|
If `x` and `y` are positive numbers, the program should print the rectangles as seen in the examples, otherwise, the function should print nothing.
|
2021-10-14 12:02:26 +00:00
|
|
|
|
2020-07-30 10:11:28 +00:00
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
#### Expected function
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
```go
|
2020-08-06 08:52:09 +00:00
|
|
|
func QuadE(x,y int) {
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-03-30 15:02:46 +00:00
|
|
|
#### Usage
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
Here are possible programs to test your function :
|
|
|
|
|
|
|
|
Program #1
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadE(5,3)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
ABBBC
|
|
|
|
B B
|
|
|
|
CBBBA
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Program #2
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadE(5,1)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
ABBBC
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Program #3
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadE(1,1)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
A
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Program #4
|
|
|
|
|
|
|
|
```go
|
|
|
|
package main
|
|
|
|
|
2021-05-02 15:18:17 +00:00
|
|
|
import "piscine"
|
2020-07-30 10:11:28 +00:00
|
|
|
|
|
|
|
func main() {
|
2020-08-06 08:52:09 +00:00
|
|
|
piscine.QuadE(1,5)
|
2020-07-30 10:11:28 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
And its output :
|
|
|
|
|
|
|
|
```console
|
2021-04-28 09:47:34 +00:00
|
|
|
$ go run .
|
2020-07-30 10:11:28 +00:00
|
|
|
A
|
|
|
|
B
|
|
|
|
B
|
|
|
|
B
|
|
|
|
C
|
2021-04-28 09:47:34 +00:00
|
|
|
$
|
2020-07-30 10:11:28 +00:00
|
|
|
```
|