PSeInt O operator (or): when one condition is enough
Joins two conditions and is true when at least one is. Think "this or that will do".
- Group:
- Logical
- Template
O
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.
Algoritmo Example Escribir (5 > 3) O (2 > 8)FinAlgoritmoOutput
Shows: VERDADERO (the first one being true is enough)
This is what the console shows when the example runs.
VERDADEROGood to know
Instead of O you can write ||. The symbol works in every profile; the word O works in profiles that allow word operators, like the default one.
Some details depend on your school's profile. See the language profiles.
In a flowchart
This is how it appears in a flowchart, with the same shapes Codoritmo draws.
Template
The general form. Replace what's inside < > with your own data.
OExamples that use it
Programs from the example library where it appears, from the simplest to the most complete.
GCD and LCM
Computes the greatest common divisor and the least common multiple.
IntermediateRoman Numerals
Converts a number from 1 to 3999 into Roman numerals.
AdvancedATM
Checks your PIN and lets you check, deposit and withdraw money.
Advanced
More logical
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.