# Programa Completo Linha por Linha

Aqui está o mesmo exemplo explicado linha por linha. **Iniciantes, vocês acham que esta seção ajuda ou não? Vocês gostariam de um&#x20;*****layout*****&#x20;diferente por exemplo? Por favor, escreva para <rms@gnu.org> (em inglês).**

```c
#include <stdio.h>      /* Inclui as declarações de funções */
                        /*   de E/S comuns como a printf.  */
                        /* A maiora dos programas precisa delas.  */

int                     /* Essa função retorna um int.  */
fib (int n)             /* O nome dela é fib;  */
                        /*   seu argumento é o n.  */
{                       /* Início do corpo da função.  */
  /* Evita que a recursão seja inifinta.  */
  if (n <= 2)           /* Se n é 1 ou 2,  */
    return 1;           /*   faça com que fib retorne 1.  */
  else                  /* do contrário, some os dois números  */
                        /* Fibonacci anteriores.  */
    return fib (n - 1) + fib (n - 2);
}

int                     /* Essa função retorna um int.  */
main (void)             /* Comece aqui; ignore os argumentos.  */
{                       /* Imprima a mensagem com os números.  */
  printf ("Fibonacci series item %d is %d\n",
          20, fib (20));
  return 0;             /* Termine programa, reporte successo.  */
}
```


---

# 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/programa-completo-linha-por-linha.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.
