PSeInt Redon: round to the nearest whole number
Rounds to the nearest whole number. Exactly halfway (.5) rounds up.
- Group:
- Math Functions
- Template
Redon
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 Redon(2.5), " ", Redon(2.4)FinAlgoritmoOutput
Shows: 3 2
This is what the console shows when the example runs.
3 2In 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.
Redon(<numero>)Examples that use it
Programs from the example library where it appears, from the simplest to the most complete.
Tip Calculator
Splits a restaurant bill, tip included.
BeginnerBody Mass Index
Computes your BMI and classifies it as underweight, normal and so on.
IntermediateModular Menu
A unit converter with a menu that keeps coming back.
IntermediateGeometry
Finds a circle's area and solves a right triangle.
IntermediateCompound Interest
Watch your savings grow year by year.
IntermediateClass Grade Book
Records three grades per student and builds a class report.
Advanced
More math functions
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.