# 2. Um Programa Completo

É muito bom escrever uma função Fibonacci, mas você não pode executá-la por si só. Ela é um código útil, mas não é um programa completo. Neste capítulo, apresentamos um programa completo que contém a função `fib`. Este exemplo mostra como fazer o programa começar, como fazê-lo terminar, como realizar cálculos e como imprimir um resultado na tela.


---

# Agent Instructions: 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://mentebinaria.gitbook.io/manual-da-linguagem-gnu-c/2.-um-programa-completo.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.
