Write a function QuadA that prints a valid rectangle with a given width x and height y.
The function must draw the rectangles as shown in the examples below.
- If
xandyare positive numbers, print the rectangle. - Otherwise, print nothing.
Make sure you submit all the necessary files to run the program.
func QuadA(x, y int) {
}Expected 1
package main
import "piscine"
func main() {
piscine.QuadA(5, 3)
}Output
o---o
| |
o---oExpected 2
package main
import "piscine"
func main() {
piscine.QuadA(5, 1)
}Output
o---oExpected 3
package main
import "piscine"
func main() {
piscine.QuadA(1, 5)
}Output
o
|
|
|
o