Zoo tutorials: [ SQL | Linux | XML ]
ProgZoo: [ Java | C# | VB | C++ | Perl ]
Log in

A Gentle Introduction to
C# Programming

Tutorial: Bricks - an introduction

 

In this application we can draw bricks and half-brick. We can leave a gap, start a new row or start a new surface.

CommandMeaning
b()Draw a long brick
h()Draw a half brick
m()Leave a half brick space
q()Draw a quarter brick
r()Start a new row in front
s()Start a new surface on top

1. Warming up


Big

The default program draws two bricks and a half brick, then a new row, then a half brick.

Create a surface with two bricks and a half brick in the first row. In the next row a half-brick followed by two bricks.

A pattern of bricks

2. Copying


Big

Use copy and paste to lay five half-bricks with gaps.

A pattern of bricks

3. for


Big

Use a loop to build the same as above.

A pattern of bricks
Hint: