Multiplication tables: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
Thundergnat (talk | contribs) m (fix markup) |
||
Line 1,632: | Line 1,632: | ||
==={{header|FutureBasic}}=== |
==={{header|FutureBasic}}=== |
||
<syntaxhighlight> |
<syntaxhighlight lang="basic"> |
||
long i, j |
long i, j |
||
Line 1,933: | Line 1,933: | ||
==={{header|uBasic/4tH}}=== |
==={{header|uBasic/4tH}}=== |
||
{{trans|BBC BASIC}} |
{{trans|BBC BASIC}} |
||
<syntaxhighlight>For R = 1 To 12 |
<syntaxhighlight lang="basic">For R = 1 To 12 |
||
Print R;Tab(R * 5); |
Print R;Tab(R * 5); |
||
For C = R To 12 |
For C = R To 12 |
||
Line 2,174: | Line 2,174: | ||
•Out˘ Table 12</syntaxhighlight> |
•Out˘ Table 12</syntaxhighlight> |
||
{{Out}} |
{{Out}} |
||
< |
<pre> | 1 2 3 4 5 6 7 8 9 10 11 12 |
||
--+----------------------------------------------- |
--+----------------------------------------------- |
||
1| 1 2 3 4 5 6 7 8 9 10 11 12 |
1| 1 2 3 4 5 6 7 8 9 10 11 12 |
||
Line 2,187: | Line 2,187: | ||
10| 100 110 120 |
10| 100 110 120 |
||
11| 121 132 |
11| 121 132 |
||
12| 144</ |
12| 144</pre> |
||
=={{header|Bracmat}}== |
=={{header|Bracmat}}== |
||
Line 3,120: | Line 3,120: | ||
=={{header|EasyLang}}== |
=={{header|EasyLang}}== |
||
<syntaxhighlight>n = 12 |
<syntaxhighlight lang="easylang">n = 12 |
||
func out h . . |
func out h . . |
||
if h < 10 |
if h < 10 |
||
Line 4,063: | Line 4,063: | ||
C |
C |
||
END</syntaxhighlight>Inserting the following two lines before the inner DO loop will print the format specifier used to print each row of the table.<syntaxhighlight lang="fortran"> WRITE(1,4) (A(J), J = 1,24) |
END</syntaxhighlight>Inserting the following two lines before the inner DO loop will print the format specifier used to print each row of the table.<syntaxhighlight lang="fortran"> WRITE(1,4) (A(J), J = 1,24) |
||
4 FORMAT(1x,24A1)</syntaxhighlight>Running the program produces the following output< |
4 FORMAT(1x,24A1)</syntaxhighlight>Running the program produces the following output<pre> |
||
| 1 2 3 4 5 6 7 8 9 10 11 12 |
| 1 2 3 4 5 6 7 8 9 10 11 12 |
||
--+------------------------------------------------ |
--+------------------------------------------------ |
||
Line 4,077: | Line 4,077: | ||
10| 100 110 120 |
10| 100 110 120 |
||
11| 121 132 |
11| 121 132 |
||
12| 144</ |
12| 144</pre> |
||
=={{header|Frink}}== |
=={{header|Frink}}== |
||
Line 5,150: | Line 5,150: | ||
=={{header|МК-61/52}}== |
=={{header|МК-61/52}}== |
||
<syntaxhighlight>П0 КИП0 КИП4 КИП5 ИП4 ИП5 * С/П |
<syntaxhighlight lang="text">П0 КИП0 КИП4 КИП5 ИП4 ИП5 * С/П |
||
ИП5 ИП0 - x=0 03 |
ИП5 ИП0 - x=0 03 |
||
ИП4 ИП0 - x#0 22 ИП4 П5 БП 02 |
ИП4 ИП0 - x#0 22 ИП4 П5 БП 02 |
||
Line 5,619: | Line 5,619: | ||
Result: |
Result: |
||
<pre> |
|||
<syntaxhighlight> |
|||
1 2 3 4 5 6 7 8 9 10 11 12 |
1 2 3 4 5 6 7 8 9 10 11 12 |
||
_________________________________________________ |
_________________________________________________ |
||
Line 5,634: | Line 5,634: | ||
11 | 121 132 |
11 | 121 132 |
||
12 | 144 |
12 | 144 |
||
</pre> |
|||
</syntaxhighlight> |
|||
=={{header|PowerShell}}== |
=={{header|PowerShell}}== |
||
Line 6,725: | Line 6,725: | ||
=={{header|Scilab}}== |
=={{header|Scilab}}== |
||
{{works with|Scilab|5.5.1}} |
{{works with|Scilab|5.5.1}} |
||
<syntaxhighlight> nmax=12, xx=3 |
<syntaxhighlight lang="scilab"> nmax=12, xx=3 |
||
s= blanks(xx)+" |" |
s= blanks(xx)+" |" |
||
for j=1:nmax |
for j=1:nmax |