↘️Input Statement
Input Statement:
Syntax:
Explanation: The Dolphin
statement in Animal-Script is used to take user input and assign it to a variable. The syntax consists of two components:
Dolphin
: This keyword initiates the input statement.<variable_name>
: This is the name of the variable to which the user input will be assigned.
Example:
In this example, the program prompts the user to enter a value for the variable age
.
Output:
The program waits for the user to input a value. Once the user enters a value and presses Enter, the value is assigned to the variable age
.
Usage:
The
Dolphin
statement is commonly used in programs that require user input for dynamic behavior or to customize the program's behavior based on user input.It allows programs to interact with users, making them more user-friendly and interactive.
After using the
Dolphin
statement, the value entered by the user can be used in subsequent calculations, comparisons, or other operations within the program.
Last updated