Skip to content
EspañolWorkspace →

PSeInt Escribir: print messages and values

Shows a message or a value in the console; it's how your program talks to whoever uses it. Mix text in quotes and variables by separating them with commas.

Template
Escribir
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.

escribir-print-output.psc · 4 lines
Algoritmo Example    nombre <- "Ana"    Escribir "Hola, ", nombreFinAlgoritmo

Output

Shows: Hola, Ana

This is what the console shows when the example runs.

Hola, Ana

Another example

escribir-print-output.psc · 3 lines
Algoritmo Example    Escribir "Total: ", 3 + 4FinAlgoritmo

Output

Shows: Total: 7

This is what the console shows when the example runs.

Total: 7

Common mistake

Text goes inside quotes; variables go without them.

In a flowchart

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

Escribir "Hola, ", nombre
In the flowchart. Flowchart: a output parallelogram reading "Escribir "Hola, ", nombre", 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.

Escribir · 1 line
Escribir <expresion>

Examples that use it

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

  • Hello World

    Your first algorithm: print a couple of messages on screen.

    Beginner
  • Personal Greeting

    Asks for your name and age, and answers with both.

    Beginner
  • Temperature Converter

    Converts degrees Celsius to Fahrenheit and Kelvin.

    Beginner
  • Tip Calculator

    Splits a restaurant bill, tip included.

    Beginner
  • Can I Vote?

    Tells you whether you can vote or how many years you have left.

    Beginner
  • Coffee Shop Menu

    Pick a drink from the menu and get the total to pay.

    Beginner
See every Input & output example →

More structures

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.