Skip to content
EspañolWorkspace →

Division in PSeInt: the / operator

Divides the left number by the right one. The result can have decimals.

Group:
Algebraic
Template
/
Open it in Codoritmo

Opens the editor with this example loaded. Run it step by step and watch the flowchart.

Worked example

A complete algorithm, ready to copy and run.

division-operator.psc · 3 lines
Algoritmo Example    Escribir 7 / 2FinAlgoritmo

Output

Shows: 3.5

This is what the console shows when the example runs.

3.5

Common mistake

To keep only the whole part use Trunc(7 / 2), which gives 3. Dividing by 0 is an error.

In a flowchart

This is how it appears in a flowchart, with the same shapes Codoritmo draws.

promedio ← suma / n
Used inside a calculation. It has no shape of its own; it's used inside a calculation. Flowchart: a process rectangle reading "promedio ← suma / n", with one arrow in and one arrow out.
Draw the flowchart of your own algorithm →

Template

The general form. Replace what's inside < > with your own data.

/ · 1 line
/

Examples that use it

Programs from the example library where it appears, from the simplest to the most complete.

See every Math example →

More algebraic

Codoritmo is an independent, open-source project inspired by PSeInt and compatible with its syntax. It is not affiliated with the PSeInt project. Official PSeInt website.