Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 138 - CodePilot V5.0 C5
P. 138

    Step   16  Drag set global Answer to and connect the number block (0) from the

                                   Math category.

                      Step   17    Add a Loop for multiplication, inside the Button1 block, drag the block

                                   'for each number from 1 to 10 by 1' from the Control category. This loop
                                   will repeat 10 times, calculating the multiplication values from 1 to 10.

                      Step   18  Drag the set global Answer to block from the Variables section.

                      Step   19  Add the multiplication logic from the Math category, drag the addition
                                   block (+) and connect it to set global Answer to.

                      Step   20  Set the first slot to get global Answer from the Variables category, drag
                                   get global Answer and place it in the first slot of the addition block.

                      Step   21  Add  the  input  number  from the  TextBox1                       SHORT SIGN
                                   section, drag TextBox1. Text and place it in                       To Refresh

                                   the second slot of the addition block.                        Companion Screen:

                      Step   22  From the Lists category, drag the add items                            Alt + R
                                   to list block into the Viewer and connect it to

                                   global List to store the multiplication results.

                     136      CodePilot (V5.0)-V

| 133 134 135 136 137 138 139 140 141 142 143 |