Skip to content
am4946110Public

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

quadA

Instructions

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 x and y are positive numbers, print the rectangle.
  • Otherwise, print nothing.

Make sure you submit all the necessary files to run the program.


Expected function

func QuadA(x, y int) {

}

Expected 1

package main

import "piscine"

func main() {

    piscine.QuadA(5, 3)
}

Output

o---o
|   |
o---o

Expected 2

package main

import "piscine"

func main() {
    piscine.QuadA(5, 1)
}

Output

o---o

Expected 3

package main

import "piscine"

func main() {
    piscine.QuadA(1, 5)
}

Output

o
|
|
|
o

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages