"%" Remainder of division Version 3 (Net)
Action group: Operators
Description
The action is designed to get the remainder from dividing one number by another.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Dividend | Value or variable of dividend | Robin.Numeric | Yes | |
Divisor | Value or variable of divisor | Robin.Numeric | Yes | |
Results | ||||
Result | Remainder from division of dividend by divisor | Robin.Numeric |
Special conditions of use
None.
Example of use
Task
There is "Variable 1" with value 17 and "Variable 2" with value 3. It is required to find out the remainder from dividing variable 1 by variable 2, write the result to a numeric variable and display the obtained number in a dialog box.
Solution
Use the actions "Remainder of division" and "Show message".
Implementation
- Assemble a robot scheme consisting of actions:
- Create a numeric variable "Variable 3" into which the result of the "Remainder of division" action will be written.
- Move the "Remainder of division" action to the workspace and set its parameters.
- Move the "Show message" action to the workspace and set its parameters.
- Start the robot using the "Start" button in the top panel.
Result
A dialog box with the total is displayed on the screen: 17/3 = 5 (remainder 2)
Обзор
Инструменты контента