Site icon TestingDocs.com

Getting User Input in Flowgorithm Flowchart

Overview

In this tutorial, we will learn the steps involved in getting user input in the Flowgorithm flowchart. We have discussed assigning a value to the variable using the Assign shape.

( https://www.testingdocs.com/create-variables-in-flowgorithm-flowchart/)

The general steps to take user input in the flowchart are as follows:

Example

To get a better understanding, we will design a flowchart to greet the user. The flowchart prompts the user to enter his/her name. The flowchart saves the user name and then greets the user.

Launch the Flowgorithm application. Declare a variable to hold the user name. Let’s name the variable as UserName. The data type of the variable should be String.

Output Symbol

An Output shape is used to display data on the computer screen. We can use expressions and variables in the Output shape.

Add an Output shape to the flowchart. This is to prompt the user to enter the name. Left click on the flowchart arrow line and choose the Output shape.

 

 

Double click on the Output shape. Enter the user prompt message and click on the OK button.

Input Symbol

An Input shape reads the input from the keyboard and stores the data in the specified variable. Add an Input shape to store the user input and assign it to the variable declared in the first step. Double click on the Input shape and enter the variable name. Click on the OK button.

 

 

Add another Output shape to display the greeting to the user. Let’s personalize the greeting and add the name of the user. Double click on the Output shape and enter the expression in the Expression box.

“Hello , ” & UserName

Concatenation operator

& is the concatenation operator in Flowgorithm. The concatenation operator joins the strings and combines it as one String. For example, if the UserName variable holds “John” then the expression would be:

“Hello , ” & UserName   -> “Hello , John”

Run the Flowchart

Click on the green play button in the Toolbar to run the flowchart.

 

 

  1. Green button to run the flowchart.
  2. The user prompt is displayed by the flowchart.
  3. User Input to the flowchart. (John)
  4. Flowchart output. ( Hello , John )

Flowgorithm Tutorials

Flowgorithm flowchart tutorials on this website:

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

Flowgorithm Website

For more information on the Flowgorithm tool, please visit the official website at:

http://flowgorithm.org/

Exit mobile version