Input and Output

Input

In Pseudocode, values are input using the INPUT command as follows:

INPUT <identifier>

The identifier should be a variable (that may be an individual element of a data structure such as an array, or a custom data type).

So if we wanted the user to input their name we would write:

INPUT name

Output

Values are output using the OUTPUT command as follows:

OUTPUT <value(s)> 

Several values, separated by commas, can be output using the same command.

OUTPUT("You have ", Lives, " lives left") 

Example

OUTPUT("What is your name?")
INPUT name      //STRING
OUTPUT("What is your favourite animal?")
INPUT animal    //STRING
OUTPUT("Your name is ", name)
OUTPUT("Your favourite animal is the ", animal)