"\" Integer division Version 4 (Net)

Action group: Operators


Description

The action is designed to obtain an incomplete quotient from dividing one number by another number.

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
DividendValue or variable of dividendRobin.Numeric
Yes
DivisorValue or variable of divisorRobin.Numeric
Yes
Results
ResultResult from floor division of two numbersRobin.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 perform integer division of 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 "Integer division" and "Show message". 

Implementation

  1. Assemble a robot scheme consisting of actions: 
  2. Create a numeric variable "Variable 3" into which the result of the "Integer division" action will be written
  3. Move the "Integer division" action to the workspace and set its parameters.  
  4. Move the "Show message" action to the workspace and set its parameters.  
  5. Start the robot using the "Start" button in the top panel. 

Result 

A dialog box with the total value is displayed on the screen: 17/3 = 5 (remainder 2)  

 

  • Нет меток