Features & Software

PSeInt Flowcharts: How to Create, Read and Export Diagramas de Flujo

Small flowchart with start, input, decision diamond and end symbols

A flowchart — diagrama de flujo — is a picture of an algorithm. Boxes represent actions, diamonds represent decisions and arrows show the order in which everything happens. Teachers love flowcharts because they reveal the logic of a solution at a glance, independent of any language. PSeInt is one of the few beginner tools that can generate the flowchart of any algorithm automatically, and even let you edit the diagram.

This guide explains the standard symbols, shows exactly how each PSeInt instruction is drawn, walks through converting pseudocode to a flowchart (and back), and covers exporting diagrams for assignments. You can follow every example in our online editor, which draws the flowchart of your code live and exports it as a PNG image.

Why use flowcharts?

  • They make logic visible. You can see every possible path through the algorithm, including the ones you forgot to test.
  • They are language-independent. A flowchart drawn today describes the same solution in PSeInt, Python or Java.
  • They help communicate. Explaining an algorithm to a classmate or a teacher is easier with a diagram than with code.
  • They catch structural mistakes. A loop with no exit or a decision whose branches never meet again is obvious in a drawing.

The trade-off is size: a 50-line program produces a tall diagram. That is why flowcharts are most useful for small algorithms and for the core logic of bigger ones.

Flowchart symbols

SymbolShapeMeaningPSeInt instruction
TerminalRounded rectangle (pill)Start or end of the algorithmAlgoritmo / FinAlgoritmo
Input / outputParallelogramReading data or showing resultsLeer, Escribir
ProcessRectangleA calculation or assignmentx <- a + b, Definir, Dimension
DecisionDiamondA question with true/false (or multiple) exitsSi, Segun, Mientras, Repetir
Loop headerHexagonCounting loop with start, end and stepPara
Predefined processRectangle with double sidesA call to a subroutineSubProceso call
Flow lineArrowOrder of execution—

Some textbooks distinguish input and output with different shapes (for example a "document" shape for printed output). PSeInt and our editor use the parallelogram for both, labelled with the instruction so there is no ambiguity.

Rules of a well-formed flowchart

  1. There is exactly one start and one end.
  2. The flow goes from top to bottom; arrows only go upwards when they return to the start of a loop.
  3. Every symbol except the end has an exit, and every symbol except the start has an entry.
  4. Decision diamonds have labelled exits (V/F, Sí/No, or the option values).
  5. The branches of a decision meet again at a single point before the flow continues.
  6. Text inside the symbols is short: one instruction per symbol.

How each PSeInt structure is drawn

Sequence

Instructions that run one after another are drawn as a vertical chain of symbols connected by arrows. This program produces a start pill, two input parallelograms, a process rectangle, an output parallelogram and the end pill:

Algoritmo Suma
    Leer a
    Leer b
    s <- a + b
    Escribir "Suma: ", s
FinAlgoritmo

Si – Entonces – SiNo

A diamond contains the condition. The true branch (V) leaves from one side and the false branch (F) from the other; each branch contains its own sequence of symbols, and both meet at a connector point below the diamond. If there is no SiNo, the false branch is simply a line going straight to the meeting point.

Algoritmo Mayoria
    Definir edad Como Entero
    Leer edad
    Si edad >= 18 Entonces
        Escribir "Mayor de edad"
    SiNo
        Escribir "Menor de edad"
    FinSi
FinAlgoritmo

Segun

Segun is drawn as a diamond with the evaluated expression and one exit per option, each labelled with its values ("1", "2, 3", "De otro modo"). All branches join again at the bottom.

Mientras

The condition diamond is at the top. The true exit goes down into the body; at the end of the body an arrow goes back up to the diamond. The false exit leaves the loop. Seeing the condition before the body makes it clear that the body may never run.

Algoritmo CuentaRegresiva
    Definir n Como Entero
    n <- 3
    Mientras n > 0 Hacer
        Escribir n
        n <- n - 1
    FinMientras
    Escribir "¡Despegue!"
FinAlgoritmo

Repetir – Hasta Que

Here the body comes first and the condition diamond is at the bottom. When the condition is false, an arrow returns to the top of the body; when it is true, the flow continues downwards. The position of the diamond shows visually that the body always runs at least once — the key difference from Mientras.

Para

Counting loops are often drawn with a special hexagon (or a "loop limit" symbol) containing the variable, start, end and step: i ← 1 hasta 10 paso 1. The body hangs below it and an arrow returns to the hexagon after each pass. Some textbooks instead expand Para into its three parts — initialisation rectangle, condition diamond, increment rectangle — which is useful to understand how the loop really works.

SubProcesos and functions

A call to a subprocess appears as a rectangle with double vertical sides. The subprocess itself gets its own separate flowchart, starting with a terminal that shows its name and parameters. In our online editor, choose the function from the drop-down list above the diagram to see its flowchart.

Generating a flowchart in PSeInt (desktop)

  1. Write or open your algorithm in the PSeInt editor.
  2. Click the flowchart button in the toolbar (the icon with a small diagram), or use the corresponding option in the menu.
  3. A new window shows the diagram. You can zoom, move around and, in edit mode, change texts or drag new structures from the side panel.
  4. When you edit the diagram, PSeInt can apply the changes back to the pseudocode in the main window. Keep the original file saved before experimenting, so you can always return to it.
  5. The diagram window also lets you save the drawing as an image for your report.

PSeInt can also show diagrams in different styles (for example classic flowcharts or Nassi-Shneiderman diagrams) depending on its configuration; if your teacher asks for a specific style, look in the configuration options.

Generating a flowchart online

Our online editor creates the flowchart automatically from the code:

  • Write the algorithm in the editor. The diagram updates about half a second after you stop typing.
  • Use Zoom +/− and Fit to screen to navigate long diagrams.
  • Click any block and the editor selects its line of code — great for connecting the picture with the text.
  • Press Step: the block about to run is highlighted in the diagram while the line is highlighted in the code.
  • Export PNG downloads a high-resolution image ready to paste into a document.

If your code has a syntax error, the diagram keeps the last valid version and shows the error message underneath, so you can fix it without losing the drawing.

From flowchart to pseudocode

Exams often give you a flowchart and ask for the pseudocode. Work through it methodically:

  1. Start at the start symbol and follow the arrows downwards.
  2. Each parallelogram becomes a Leer or Escribir; each rectangle becomes an assignment.
  3. For each diamond, look at where its branches go:
    • Both branches continue downwards and meet → Si … SiNo … FinSi.
    • One branch goes down into a block that returns above the diamond → Mientras.
    • An arrow from below the block returns to its top → Repetir … Hasta Que.
  4. Indent the pseudocode as you go, closing each structure when its branches meet.
  5. Check the result: paste it into the online editor and compare the generated diagram with the original.

A complete example

This algorithm computes the average of positive numbers entered by the user until a zero appears. It contains a sequence, a Mientras loop and a Si inside the loop — a compact way to see how structures nest in a diagram.

Algoritmo PromedioPositivos
    Definir x, suma Como Real
    Definir cant Como Entero
    suma <- 0
    cant <- 0
    Escribir "Ingrese números (0 para terminar):"
    Leer x
    Mientras x <> 0 Hacer
        Si x > 0 Entonces
            suma <- suma + x
            cant <- cant + 1
        FinSi
        Leer x
    FinMientras
    Si cant > 0 Entonces
        Escribir "Promedio de positivos: ", suma / cant
    SiNo
        Escribir "No hubo números positivos"
    FinSi
FinAlgoritmo

In its flowchart you'll see the loop diamond with the body underneath, a decision diamond nested inside the body (its false branch is an empty line), the return arrow climbing to the loop condition, and finally a second decision after the loop. Load it in the editor and step through it with inputs 4, -2, 6, 0: the highlighted block moves through the diagram exactly as the arrows describe, and the result is 5.

Tips for clean diagrams

  • Keep instructions short. Long expressions make wide boxes. Calculate intermediate values in separate variables.
  • Use subprocesses for big algorithms. Each gets its own small diagram instead of one gigantic chart.
  • Name things clearly. promedio <- suma / cant is self-explanatory in a box; p <- s / c is not.
  • Avoid deep nesting. Three levels of Si inside each other make wide diagrams; Segun or a reordered chain of conditions is often clearer.

Common flowchart mistakes

  • Decisions without labels. A diamond whose exits are not marked V/F leaves the reader guessing which path is which.
  • Branches that never meet. Both exits of a Si must rejoin before the flow continues; otherwise the diagram has two different "rest of the program".
  • Loops that return to the wrong place. In a Mientras the arrow must go back to the condition, not to the first instruction of the body.
  • Several instructions in one box. Keep one action per symbol, so each box maps to one line of pseudocode.
  • Missing input or output. If a variable is used in a calculation, the diagram must show where its value came from.

Desk-checking with a flowchart

A flowchart is also a great tool for tracing an algorithm by hand. Put a finger on the start symbol and follow the arrows, writing the value of each variable in a table every time you pass through a rectangle or a parallelogram. At each diamond, evaluate the condition with the current values and follow the matching exit. Doing this once for the example above with inputs 4, -2, 6 and 0 shows clearly why the negative number is ignored and why the loop stops at zero.

Flowcharts in exams

When you draw a flowchart by hand, use a pencil and a ruler, leave space between symbols for arrows and labels, and draw loops first as a frame before filling in their bodies. Neatness is not decoration: a clean diagram is far easier for the examiner — and you — to check.

Flowchart vs. pseudocode: which should I write first?

Both are valid. Visual thinkers often sketch a rough flowchart on paper first, then write pseudocode. Others write pseudocode and generate the diagram to check the structure. With PSeInt you don't have to choose: write either, generate the other, and compare. Seeing the same algorithm in two forms is one of the fastest ways to understand control flow.

Frequently asked questions

Can PSeInt create flowcharts automatically?

Yes. The desktop program draws the flowchart of the current algorithm with one click and can also edit it. Our online editor generates it live as you type.

How do I save a PSeInt flowchart as an image?

In the desktop program, use the save/export option in the diagram window. In our online editor, click Export PNG above the diagram.

What is the difference between a flowchart and pseudocode?

Both describe the same algorithm. Pseudocode uses text instructions; a flowchart uses standard symbols connected by arrows. Pseudocode is more compact, flowcharts are easier to read at a glance.

Why is my flowchart not updating?

The algorithm probably has a syntax error. Fix the error reported under the diagram (or in PSeInt's error panel) and the flowchart will be regenerated.