1. In a worksheet, click where you want to place a program.
2. On the Math tab, in the Operators and Symbols group, click Programming, and then click the Program operator . A program with an empty placeholder appears.
3. Type a math expression and include a programming operator. Here, the value of s is defined inside the program and therefore it is not known outside the program.
4. Press Enter. A new program line is added with an empty placeholder.
5. Repeat steps 3 and 4 until you complete your program. Double bars on the left indicate programming steps that are on the same level. Each double bar has a corresponding single bar on the right. The last programming step defines the program output.
6. To insert a new program line above the continue operator, place the cursor to the left of continue, and then press Enter. A new program line appears inside the if block.
7. To insert a new program line after the for block, place the cursor to the right of the single bar that defines the for block, and then press Enter. A new program line appears outside the for block.
Additional Information
• You can type the name of a programming operator and then press Ctrl+J to convert the name to a programming operator with all its placeholders.
• To insert a comment in your program, add a string in a new line.