Site icon TestingDocs.com

Flowgorithm Input Statement

Flowgorithm Input Statement

In the Flowgorithm flowchart, each action that the computer can perform is represented by a different symbol. An Input statement symbol reads information from a standard input device, such as the keyboard, and stores the value in a flowchart variable.

Input Statement

By default, the input statement is represented with a blue color parallelogram. Before using the input statement, declare an input variable using the Declare symbol.

 

Let’s declare a variable n

Steps to add the Input symbol to the flowchart:

 

 

Initially, the symbol will appear in gray color. The gray color indicates that the flowchart symbol is incomplete. This means that the variable should be specified in the symbol. The Input symbol stores the value in this variable.

Double click on the input symbol and specify the input variable to store the input value.

Specify the variable name in the ‘Enter a variable name below:’ textbox and click on the OK button.

 

The symbol changes to blue color in the flowchart. The blue color of the input symbol indicates successful creation.

XML Syntax

The Flowgorithm flowchart is internally stored in the XML structure. We can edit the .fprg flowchart file using a text editor.

The Input flowchart symbol is represented as follows:

XML Flowchart Input Symbol
<input variable=””/>

The XML input tag for the Input symbol when the variable is not yet assigned to the symbol in the flowchart.

<input  variable=”sum”/>

The XML input tag for the input symbol when the variable is assigned to the Input symbol in the flowchart. The variable name is the sum. The input is read from the keyboard and stored in the variable sum.

Exercise

Declare a variable called the name of datatype String. Prompt the user to enter the name. Store the user input in the variable using an Input symbol.
Print the name to the output screen.

 

The Flowgorithm Input statement is a handy tool for storing user input in variables.

Flowgorithm Tutorials

Flowgorithm flowchart tutorials on this website:

https://www.testingdocs.com/flowgorithm-flowchart-tutorial/

Exit mobile version