Get User Input in Flowgorithm [ 2024 ]
Get User Input in Flowgorithm
In this tutorial, we will learn the steps in getting user input in the Flowgorithm flowchart. We have discussed assigning a value to the variable using the Assign shape.
The general steps to take user input in the flowchart are as follows:
- Declare a variable to hold the user input data.
- Prompt the user with a user-friendly message.
- Save the user input to the variable.
Example
To better understand, we will design a flowchart to greet the user. The flowchart prompts the user to enter his/her name, 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 displays data on the computer screen. Expressions and variables can be used in the Output shape.
Add an Output shape to the flowchart. This will 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 user’s name. 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.
- Green button to run the flowchart.
- The flowchart displays the user prompt.
- User Input to the flowchart. (John)
- Flowchart output. ( Hello , John )
Flowgorithm Tutorials
Flowgorithm flowchart tutorials on this website:
Flowgorithm Website
For more information on the Flowgorithm tool, please visit the official website at: