Computer Studies‎ > ‎Turing‎ > ‎Turing Tutorial‎ > ‎

Turing 013 — Concatenation with a Comma

A comma can be used to separate individual items that you want to print with a single put statement. Example:

put "2 + 2 = ", 2 + 2

...prints "2 + 2 = 4" on the screen.

Assignment

Write a program that prints the 12 times table from 12 X 1 to 12 X 12.

Each line output to the screen must be created using a single put statement, and the product of each line must be calculated. For example, if the assignment were to add 5 to all numbers from 1 to 12, the first line would be:

put "1 + 5 = ", 1 + 5

Save as "013.t".
Comments