> For the complete documentation index, see [llms.txt](https://42-guide.gitbook.io/42-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://42-guide.gitbook.io/42-guide/piscine-life/rushes/rush00.md).

# Rush00

## **C Piscine - Rush 00**

#### **Introduction**

The **Rush 00** project is a team-based coding challenge at **42 School's C Piscine**, designed to test students' ability to write clean, structured, and efficient C programs. The goal is to create a **function that generates rectangles of different sizes** using ASCII characters, reinforcing fundamental C programming concepts such as functions, loops, and output formatting.

#### **Project Rules & Guidelines**

* Teams of 3 **students** are required.
* The **Moulinette** (automated grading system) checks your code with strict flags: `-Wall -Wextra -Werror`.
* The project **must be completed before the defense**, where you’ll present and explain your code.
* **Team collaboration** is crucial—everyone must understand the code, as defense grading is based on the weakest explanation.

#### **Objective**

Students must create a **function named `rush()`** that generates different **rectangle shapes** based on given dimensions (width `x` and height `y`). The rectangles should be printed using specific ASCII characters.

#### **Rush Variants & Expected Output**

Each **Rush (00 to 04)** has a slightly different pattern for drawing the rectangles:

1. **Rush 00** (Basic Rectangle)

   ```
   luaCopyEditrush(5, 3) →
   o---o
   |   |
   o---o
   ```
2. **Rush 01** (Diagonal Corners)

   ```c
   rush(5, 3) →
   /***\
   *   *
   \***/
   ```
3. **Rush 02** (Different Top & Bottom Borders)

   ```c
   rush(5, 3) →
   ABBBA
   B   B
   CBBBC
   ```
4. **Rush 03** (Symmetric Corners)

   ```c
   rush(5, 3) →
   ABBBC
   B   B
   ABBBC
   ```
5. **Rush 04** (Reversed Bottom Corners)

   ```c
   rush(5, 3) →
   ABBBC
   B   B
   CBBBA
   ```

#### **Implementation Details**

* The function **`rush(int x, int y)`** receives the rectangle dimensions as input and prints the pattern accordingly.
* The project only allows **basic functions** like `write()`.
* You need to create and submit the following files:
  * `main.c` (for testing)
  * `ft_putchar.c` (for character output)
  * `rush0X.c` (where "0X" is the corresponding rush number)

#### **Final Thoughts**

Rush 00 challenges students to work in teams, think logically, and implement structured C code with clear output formatting. This project serves as a **foundation for handling more complex programming problems** later in the C Piscine.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://42-guide.gitbook.io/42-guide/piscine-life/rushes/rush00.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
