Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Multiplication Table in Various Programming Lan...

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for 趙惟倫 趙惟倫
September 18, 2018

Multiplication Table in Various Programming Languages

Avatar for 趙惟倫

趙惟倫

September 18, 2018

More Decks by 趙惟倫

Other Decks in Programming

Transcript

  1. Beginner's practices 1st program Hello, World! 2nd program Multiplication Table

    <https://github.com/bluebat/mt9x9> 3rd program Fibonacci Number ? 1x1= 1 1x2= 2 1x3= 3 1x4= 4 1x5= 5 1x6= 6 1x7= 7 1x8= 8 1x9= 9 2x1= 2 2x2= 4 2x3= 6 2x4= 8 2x5=10 2x6=12 2x7=14 2x8=16 2x9=18 3x1= 3 3x2= 6 3x3= 9 3x4=12 3x5=15 3x6=18 3x7=21 3x8=24 3x9=27 4x1= 4 4x2= 8 4x3=12 4x4=16 4x5=20 4x6=24 4x7=28 4x8=32 4x9=36 5x1= 5 5x2=10 5x3=15 5x4=20 5x5=25 5x6=30 5x7=35 5x8=40 5x9=45 6x1= 6 6x2=12 6x3=18 6x4=24 6x5=30 6x6=36 6x7=42 6x8=48 6x9=54 7x1= 7 7x2=14 7x3=21 7x4=28 7x5=35 7x6=42 7x7=49 7x8=56 7x9=63 8x1= 8 8x2=16 8x3=24 8x4=32 8x5=40 8x6=48 8x7=56 8x8=64 8x9=72 9x1= 9 9x2=18 9x3=27 9x4=36 9x5=45 9x6=54 9x7=63 9x8=72 9x9=81
  2. Code to Code BASICA QBASIC #!/usr/bin/basica #!/usr/bin/basica 11 REM REM

    ./mt9x9.BAS ./mt9x9.BAS |||| basica basica mt9x9.BAS mt9x9.BAS #!/usr/bin/bas #!/usr/bin/bas rem rem ./mt9x9.qbs ./mt9x9.qbs |||| bas bas mt9x9.qbs mt9x9.qbs 10 10 FOR FOR II == 11 TO TO 99 STEP STEP 33 20 20 FOR FOR JJ == 11 TO TO 99 30 FOR 30 FOR KK == II TO TO I+2 I+2 40 PRINT 40 PRINT USING USING "#x#=##"+CHR$(9); "#x#=##"+CHR$(9); K, K, J,J, K*J; K*J; 50 NEXT 50 NEXT 60 PRINT 60 PRINT CHR$(10); CHR$(10); 70 70 NEXT NEXT 80 80 PRINT PRINT 90 NEXT 90 NEXT for for i% i% == 11 toto 99 step step 33 for for j% j% == 11 toto 99 for for k% k% == i% i% toto i%+2 i%+2 print using "#x#=##"+chr$(9); print using "#x#=##"+chr$(9); k%, k%, j%, j%, k%*j%; k%*j%; next next k% k% print chr$(10); print chr$(10); next next j% j% print print next next i% i%
  3. Code to Code VBScript VB.NET ‘‘ oscript oscript mt9x9.vbs mt9x9.vbs

    Rem Rem vbnc vbnc mt9x9.vbn mt9x9.vbn && && mono mono mt9x9.exe mt9x9.exe For For ii == 11 To To 99 Step Step 33 For For jj == 11 To To 99 ss == """" For For kk == ii To To i+2 i+2 ss == s+CStr(k)+"x"+CStr(j)+"=" s+CStr(k)+"x"+CStr(j)+"=" IfIf k*j k*j << 10 10 Then Then ss == s+" " s+" " End End IfIf ss == s+CStr(k*j)+vbTab s+CStr(k*j)+vbTab Next Next Wscript.Echo Wscript.Echo ss Next Next Wscript.Echo Wscript.Echo """" Next Next Imports Imports System.Console System.Console Module mt9x9 Module mt9x9 Sub Sub Main() Main() Dim Dim i,i, j,j, kk As As Integer Integer For i = 1 to 9 step For i = 1 to 9 step 33 For For jj == 11 toto 99 For For Each Each kk InIn New New Integer() Integer() {i,{i, i+1, i+1, i+2} i+2} Write("{0}x{1}={2,2}{3}", Write("{0}x{1}={2,2}{3}", k,k, j,j, k*j, k*j, vbTab) vbTab) Next Next Write(vbLf) Write(vbLf) Next Next WriteLine() WriteLine() Next Next End End Sub Sub End Module End Module
  4. Code to Code PureBasic FreeBasic ;;pbcompiler pbcompilermt9x9.pb mt9x9.pb-o -omt9x9 mt9x9&&

    &&./mt9x9 ./mt9x9 ' ' fbc fbc mt9x9.bas mt9x9.bas && && ./mt9x9 ./mt9x9 OpenConsole() OpenConsole() For Forii==11To To99Step Step33 For Forjj==11To To99 For Forkk==iiTo Toi+2 i+2 Print(Str(k)+"x"+Str(j)+"="+RSet(Str(k*j),2)+Chr(9)) Print(Str(k)+"x"+Str(j)+"="+RSet(Str(k*j),2)+Chr(9)) Next Nextkk Print(~"\n") Print(~"\n") Next Nextjj PrintN("") PrintN("") Next Nextii CloseConsole() CloseConsole() for for ii as as integer integer == 11 toto 99 step step 33 for for jj as as integer integer == 11 toto 99 for for kk as as integer integer == ii toto i+2 i+2 print using "#x#=##"+chr(9); print using "#x#=##"+chr(9); k;k; j;j; k*j; k*j; next k next k print print chr(10); chr(10); next j next j print print next next ii
  5. Code to Code Ring xBASE #!/usr/bin/ring #!/usr/bin/ring //// ./mt9x9.ring ./mt9x9.ring

    |||| ring ring mt9x9.ring mt9x9.ring #!/usr/bin/hbrun #!/usr/bin/hbrun **./mt9x9.prg ./mt9x9.prg||||hbrun hbrunmt9x9.prg mt9x9.prg for for ii == 11 toto 99 step step 33 for for jj == 11 toto 99 for for kk inin [i,[i, i+1, i+1, i+2] i+2] see "" + k + see "" + k + "x" "x" ++ jj ++ "=" "=" ifif k*j<10 k*j<10 see see "" "" ok ok see "" + k*j + tab see "" + k*j + tab next next put put nlnl next next ?? """" next next local locali,i,j,j,kk for forii:= :=11toto99step step33 for forjj:= :=11toto99 for foreach eachkkinin{i,{i,i+1, i+1,i+2} i+2} ?? ??str(k, str(k,1) 1)++"x" "x"++str(j, str(j,1) 1)++"=" "="++str(k*j, str(k*j,2) 2)++chr(9) chr(9) next next ?? ??chr(10) chr(10) next next ?? next next
  6. Code to Code Focal 00.03 00.03COMMENT COMMENTfocal focalmt9x9.fc mt9x9.fc 01.01

    01.01FOR FORI=1,3,9; I=1,3,9;DO DO02 02 01.02 01.02QUIT QUIT 02.01 02.01FOR FORJ=1,1,9; J=1,1,9;DO DO03 03 02.02 02.02TYPE TYPE! ! 02.03 02.03RETURN RETURN 03.01 03.01FOR FORK=I,1,I+2; K=I,1,I+2;DO DO04 04 03.02 03.02TYPE TYPE! ! 03.03 03.03RETURN RETURN 04.01 04.01SET SETS=K; S=K;DO DO05 05 04.02 04.02TYPE TYPE"x" "x" 04.03 04.03SET SETS=J; S=J;DO DO05 05 04.04 04.04TYPE TYPE"=" "=" 04.05 04.05SET SETS=FITR(K*J/10) S=FITR(K*J/10) 04.06 04.06IFIF(S) (S)04.07,04.07; 04.07,04.07;DO DO05; 05;GOTO GOTO04.08 04.08 04.07 04.07TYPE TYPE" "" " 04.08 04.08SET SETS=(K*J-S*10); S=(K*J-S*10);DO DO05 05 04.09 04.09TYPE TYPE"⇥ "⇥" " 04.10 04.10RETURN RETURN 05.01 05.01IFIF(S-9) (S-9)05.02; 05.02;TYPE TYPE"9"; "9";RETURN RETURN 05.02 05.02IFIF(S-8) (S-8)05.03; 05.03;TYPE TYPE"8"; "8";RETURN RETURN 05.03 05.03IFIF(S-7) (S-7)05.04; 05.04;TYPE TYPE"7"; "7";RETURN RETURN 05.04 IF (S-6) 05.05; TYPE "6"; RETURN 05.04 IF (S-6) 05.05; TYPE "6"; RETURN 05.05 05.05IFIF(S-5) (S-5)05.06; 05.06;TYPE TYPE"5"; "5";RETURN RETURN 05.06 05.06IFIF(S-4) (S-4)05.07; 05.07;TYPE TYPE"4"; "4";RETURN RETURN 05.07 IF (S-3) 05.08; TYPE "3"; RETURN 05.07 IF (S-3) 05.08; TYPE "3"; RETURN 05.08 05.08IFIF(S-2) (S-2)05.09; 05.09;TYPE TYPE"2"; "2";RETURN RETURN 05.09 05.09IFIF(S-1) (S-1)05.10; 05.10;TYPE TYPE"1"; "1";RETURN RETURN 05.10 05.10TYPE TYPE"0" "0" 05.11 05.11RETURN RETURN COMAL 33 //// opencomal opencomal <<< <<< 'enter 'enter "mt9x9.lst"'$'\n''run' "mt9x9.lst"'$'\n''run' 10 10 FOR FOR i#i# := := 11 TO TO 99 STEP STEP 33 DO DO 20 20 FOR FOR j#j# := := 11 TO TO 99 DO DO 30 FOR 30 FOR k# k# := := i#i# TO TO i#+2 i#+2 DO DO 40 PRINT k#; "x"; j#; "="; 40 PRINT k#; "x"; j#; "="; 50 PRINT 50 PRINT USING USING "##": "##": k#*j#; k#*j#; 60 PRINT 60 PRINT CHR$(9); CHR$(9); 70 ENDFOR 70 ENDFOR 80 PRINT 80 PRINT CHR$(10); CHR$(10); 90 90 ENDFOR ENDFOR 100 100 PRINT PRINT 110 ENDFOR 110 ENDFOR
  7. Code to Code B /*/* bcause bcause mt9x9.b mt9x9.b -o

    -o mt9x9 mt9x9 && && ./mt9x9 ./mt9x9 */*/ main() main() {{ auto auto i,i, j,j, k;k; ii == 1;1; while(i while(i << 10) 10) {{ jj == 0;0; while(j++ while(j++ << 9) 9) {{ kk == i;i; while(k while(k <= <= i+2) i+2) {{ putchar('0'+k); putchar('0'+k); putchar('x'); putchar('x'); putchar('0'+j); putchar('0'+j); putchar('='); putchar('='); putchar((k*j putchar((k*j << 10)?' 10)?' ':''); ':''); printn(k*j, printn(k*j, 10); 10); putchar(9); putchar(9); kk =+ =+ 1;1; }} putchar(10); putchar(10); }} putchar('*n'); putchar('*n'); ii =+ =+ 3;3; }} }} Turing+ % % tpc tpc mt9x9.t+ mt9x9.t+ && && ./mt9x9.x ./mt9x9.x var var ii :: int int := := 11 loop loop for for j:j: 11 .... 99 for for kk :: ii .... ii ++ 22 put put k,k, "x", "x", j,j, "=", "=", (k*j):2, (k*j):2, "\t" "\t" .... end end for for put "" put "" end end for for put put chr(10) chr(10) .... ii += += 33 exit exit when when ii >= >= 99 end end loop loop
  8. Code to Code BS #!/usr/bin/bs #!/usr/bin/bs ## ./mt9x9.bs ./mt9x9.bs ||||

    bs bs mt9x9.bs mt9x9.bs for for ii == 1,1, ii <= <= 9,9, ii == i+3 i+3 for for jj == 1,1, jj <= <= 9,9, ++j ++j ss == """" for for kk == i,i, kk <= <= i+2, i+2, ++k ++k ss == s_k_"x"_j_"="_("", s_k_"x"_j_"="_("", "" ")[k*j ")[k*j << 10]_k*j_"\t" 10]_k*j_"\t" next next put put == ss next next put put == """" next next run run exit exit Afnix #!/usr/bin/axi #!/usr/bin/axi ## axc axc mt9x9.als mt9x9.als && && axi axi mt9x9.axc mt9x9.axc |||| ./mt9x9.als ./mt9x9.als |||| ## axi axi mt9x9.als mt9x9.als trans trans ii 00 trans trans jj 00 trans trans kk 00 loop loop (i:= (i:= 1) 1) (<= (<= ii 9) 9) (i:+= (i:+= 3) 3) {{ loop loop (j:= (j:= 1) 1) (<= (<= jj 9) 9) (j:++) (j:++) {{ loop loop (k:= (k:= i)i) (<= (<= kk (+ (+ ii 2)) 2)) (k:++) (k:++) {{ trans trans ss (String (String (*(* kk j)) j)) print print kk 'x' 'x' jj '=' '=' (s:fill-left (s:fill-left ' ' ' ' 2) 2) '\t' '\t' }} print print '\n' '\n' }} println println }}
  9. Code to Code CMake #!/usr/bin/cmake #!/usr/bin/cmake -P -P ## ./mt9x9.cmake

    || ./mt9x9.cmake || cmake cmake -P -P mt9x9.cmake mt9x9.cmake foreach(i foreach(i RANGE RANGE 11 99 3) 3) foreach(j foreach(j RANGE RANGE 11 9) 9) foreach(K 0 1 2) foreach(K 0 1 2) math(EXPR math(EXPR kk "${i} "${i} ++ ${K}") ${K}") math(EXPR math(EXPR ss "${k} "${k} ** ${j}") ${j}") file(APPEND "/dev/stdout" file(APPEND "/dev/stdout" "${k}x${j}=") "${k}x${j}=") if(${s} if(${s} LESS LESS 10) 10) file(APPEND file(APPEND "/dev/stdout" "/dev/stdout" "" ")") endif() endif() file(APPEND file(APPEND "/dev/stdout" "/dev/stdout" "${s}\t") "${s}\t") endforeach(K) endforeach(K) file(APPEND file(APPEND "/dev/stdout" "/dev/stdout" "\n") "\n") endforeach(j) endforeach(j) message("") message("") endforeach(i) endforeach(i) Make #!/usr/bin/make #!/usr/bin/make -sf -sf ## ./mt9x9.mk || make ./mt9x9.mk || make -sf -sf mt9x9.mk mt9x9.mk include include gmsl gmsl $(foreach $(foreach i,i, 11 44 7,7, \\ $(foreach $(foreach j,j, $(call $(call sequence,1,9), sequence,1,9), \\ $(eval str=) \ $(eval str=) \ $(foreach $(foreach k,k, $i$i $(call $(call plus,$i,1) plus,$i,1) $(call $(call plus,$i,2), plus,$i,2), \\ $(eval $(eval n=$(call n=$(call multiply,$k,$j)) multiply,$k,$j)) \\ $(eval $(eval str=${str} str=${str} $kx$j=$(if $kx$j=$(if $(call $(call lt,$n,10), lt,$n,10), ,)$n) ,)$n) \\ )) \\ $(info $(info ${str}) ${str}) \\ )) \\ $(info $(info )) \\ )) all: all:
  10. Code to Code Dylan Sather ----sacomp sacompmt9x9.sa mt9x9.sa-o -omt9x9 mt9x9&&

    &&./mt9x9 ./mt9x9 module: module:mt9x9 mt9x9 class classMAIN MAINisis main mainisis loop loopi i::= ::=1.stepto!(9, 1.stepto!(9,3); 3); loop loopj j::= ::=1.upto!(9); 1.upto!(9); k:ARRAY{INT} k:ARRAY{INT}:=:=|i,|i,i+1, i+1,i+2|; i+2|; loop loop #OUT+ #OUT+k.elt!+"x"+j+"="+#FMT("%2d", k.elt!+"x"+j+"="+#FMT("%2d",k.elt!*j)+"\t" k.elt!*j)+"\t" end; end; #OUT+ #OUT+"\n"; "\n"; end; end; #OUT+ #OUT+"\n"; "\n"; end end end end end end ////make-dylan-app make-dylan-appmt9x9; mt9x9;mv mvmt9x9.dylan mt9x9.dylanmt9x9; mt9x9;cd cdmt9x9; mt9x9; ////dylan-compiler dylan-compiler-build -buildmt9x9.lid mt9x9.lid&& &&_build/bin/mt9x9 _build/bin/mt9x9 for for(i(ifrom from11below below10 10by by3) 3) for for(j(jfrom from11toto9) 9) for for(k(kfrom fromiitotoii++2) 2) format-out("%dx%d=%2d\t", format-out("%dx%d=%2d\t",k,k,j,j,kk**j);j); end; end; format-out("\n"); format-out("\n"); end; end; format-out("\n"); format-out("\n"); end; end;
  11. Code to Code Algol Simula comment comment awe awe mt9x9.alw

    mt9x9.alw -o -o mt9x9 mt9x9 && && ./mt9x9 ./mt9x9 ;; % % cim cim mt9x9.sim mt9x9.sim && && ./mt9x9 ./mt9x9 begin begin for for ii := := 11 step step 33 until until 99 do do begin begin for for jj := := 11 until until 99 do do begin begin for k := i, i+1, i+2 for k := i, i+1, i+2 do do begin begin writeon(i_w := 1, s_w writeon(i_w := 1, s_w := := 0,0, k,k, "x", "x", j,j, "="); "="); writeon(i_w writeon(i_w := := 2,2, s_w s_w := := 2,2, k*j) k*j) end k; end k; write(code(0)) write(code(0)) end end j;j; write() write() end end ii end. end. Begin Begin Integer Integer i,i, j,j, k;k; For For ii := := 11 Step Step 33 Until Until 99 Do Do Begin Begin For For jj := := 11 Step Step 11 Until Until 99 Do Do Begin Begin For For kk := := ii Step Step 11 Until Until i+2 i+2 Do Do Begin Begin OutInt(k, OutInt(k, 0); 0); OutText("x"); OutText("x"); OutInt(j, OutInt(j, 0); 0); OutText("="); OutText("="); OutInt(k*j, OutInt(k*j, 2); 2); OutText("!9!") OutText("!9!") End; End; OutImage OutImage End; End; OutImage OutImage End End End End
  12. Code to Code Oberon Modula-2 (*(* obnc obnc mt9x9.obn mt9x9.obn

    && && ./mt9x9 ./mt9x9 *)*) (*(* m2c m2c -all -all mt9x9.mod mt9x9.mod -o -o mt9x9 mt9x9 && && ./mt9x9 ./mt9x9 *)*) MODULE MODULE mt9x9; mt9x9; IMPORT IMPORT Out; Out; VAR VAR i,i, j,j, kk :: INTEGER; INTEGER; BEGIN BEGIN FOR FOR ii := := 11 TO TO 99 BY BY 33 DO DO FOR j := 1 TO FOR j := 1 TO 99 DO DO FOR FOR kk := := ii TO TO i+2 i+2 DO DO Out.Int(k,1); Out.Int(k,1); Out.String("x"); Out.String("x"); Out.Int(j,1); Out.Int(j,1); Out.String("="); Out.String("="); Out.Int(k*j,2); Out.Int(k*j,2); Out.Char(09X) Out.Char(09X) END; END; Out.Char(0AX) Out.Char(0AX) END; END; Out.Ln Out.Ln END END END END mt9x9. mt9x9. MODULE MODULE mt9x9; mt9x9; IMPORT IMPORT InOut; InOut; VAR VAR i,i, j,j, k:k: CARDINAL; CARDINAL; BEGIN BEGIN FOR FOR i:=1 i:=1 TO TO 99 BY BY 33 DO DO FOR j:=1 TO FOR j:=1 TO 99 DO DO FOR FOR k:=i k:=i TO TO i+2 i+2 DO DO InOut.WriteInt(k, InOut.WriteInt(k, 1); 1); InOut.Write('x'); InOut.Write('x'); InOut.WriteInt(j, InOut.WriteInt(j, 1); 1); InOut.Write('='); InOut.Write('='); InOut.WriteInt(k*j, InOut.WriteInt(k*j, 2); 2); InOut.Write(11C); InOut.Write(11C); END; END; InOut.Write(12C); InOut.Write(12C); END; END; InOut.WriteLn; InOut.WriteLn; END; END; END END mt9x9. mt9x9.
  13. Code to Code Ada ----gnat gnatmake makemt9x9.adb mt9x9.adb&& &&./mt9x9 ./mt9x9

    with withAda.Text_IO; Ada.Text_IO;use useAda.Text_IO; Ada.Text_IO; procedure proceduremt9x9 mt9x9isis package packageIO IOisisnew newInteger_IO Integer_IO(Integer); (Integer);use useIO; IO; VV::array (1..3) of Integer := (1, 4, 7); array (1..3) of Integer := (1, 4, 7); begin begin for foriiofofVVloop loop for forjjinin1..9 1..9loop loop for k in i..i+2 for k in i..i+2loop loop Put (k, Width Put (k, Width=> =>1); 1);Put Put("x"); ("x");Put Put(j,(j,Width Width=> =>1); 1); Put Put("="); ("=");Put Put(k*j, (k*j,Width Width=> =>2); 2);Put Put(ASCII.HT); (ASCII.HT); end endloop; loop; Put_Line Put_Line(""); (""); end loop; end loop; New_Line; New_Line; end endloop; loop; end mt9x9; end mt9x9; AdaScript #!/usr/bin/spar #!/usr/bin/spar ---- ./mt9x9.sp ./mt9x9.sp |||| spar spar mt9x9.sp mt9x9.sp procedure procedure mt9x9 mt9x9 isis begin begin ii := := 1;1; while while ii <= <= 99 loop loop for j in 1..9 for j in 1..9 loop loop for k in i..i+2 for k in i..i+2 loop loop put(k, put(k, "9"); "9"); put("x"); put("x"); put(j, put(j, "9"); "9"); put("="); put(k*j, "Z9"); put(ASCII.HT); put("="); put(k*j, "Z9"); put(ASCII.HT); end end loop; loop; put_line(""); put_line(""); end end loop; loop; new_line; new_line; ii := := @ @ ++ 3;3; end end loop; loop; end end mt9x9; mt9x9;
  14. Code to Code PL/I /*/*plic plic-C -C-dELF -dELF-lsiaxgo -lsiaxgo-ew -ewmt9x9.pli

    mt9x9.pli-o -omt9x9.o mt9x9.o ldld-z-zmuldefs muldefs-Bstatic -Bstatic--oformat=elf32-i386 --oformat=elf32-i386\\ -melf_i386 -melf_i386-e -emain mainmt9x9.o mt9x9.olibprf.a libprf.a-o -omt9x9 mt9x9*/*/ mt9x9: mt9x9:proc procoptions(main); options(main); dcl(i, dcl(i,j,j,k)k)fixed fixeddec(1); dec(1); do i = 1 to 9 by 3; do i = 1 to 9 by 3; do dojj==11toto9;9; do dokk==iitotoi+2; i+2; put edit (k, put edit (k,'x', 'x',j,j,'=', '=',k*j) k*j)(P'9', (P'9',A, A,P'9', P'9',A, A,P'Z9'); P'Z9'); put putedit edit('09'X) ('09'X)(A); (A); end; end; put putskip skipedit edit('') ('')(A); (A); end; end; put putskip skipedit edit('') ('')(A); (A); end; end; end endmt9x9; mt9x9; Pascal {{ fpc fpc mt9x9.pas mt9x9.pas && && ./mt9x9 ./mt9x9 }} program program mt9x9; mt9x9; uses SysUtils; uses SysUtils; var var i,i, j,j, kk :: Integer; Integer; begin begin for for ii inin [1, [1, 4,4, 7]7] do do begin begin for for jj := := 11 toto 99 do do begin begin for for kk := := ii toto i+2 i+2 do do begin begin Write(Format('%dx%d=%2d'#9, Write(Format('%dx%d=%2d'#9, [k, [k, j,j, k*j])); k*j])); end; end; Write(#10); Write(#10); end; end; Writeln; Writeln; end; end; end. end.
  15. Code to Code Seed7 #!/usr/bin/s7 #!/usr/bin/s7 ##s7c s7cmt9x9.sd7 mt9x9.sd7&& &&./mt9x9

    ./mt9x9||||s7 s7mt9x9.sd7 mt9x9.sd7||||./mt9x9.sd7 ./mt9x9.sd7 $$include include"seed7_05.s7i"; "seed7_05.s7i"; const constproc: proc:main mainisisfunc func local local var varinteger: integer:iiisis1;1; var varinteger: integer:jjisis1;1; var varinteger: integer:kkisis1;1; begin begin for foriirange range11toto99step step33do do for forjjrange range11toto99do do for k range [](i, for k range [](i,i+1, i+1,i+2) i+2)do do write(k <& "x" <& j <& write(k <& "x" <& j <&"=" "="<& <&k*j k*jlpad lpad22<& <&"\t"); "\t"); end for; end for; write("\n"); write("\n"); end endfor; for; writeln; writeln; end endfor; for; end func; end func; SISAL % %sisalc sisalc-fileio -fileiomt9x9.sis mt9x9.sis-o -omt9x9 mt9x9&& &&./mt9x9 ./mt9x9 define definemain main type typestring string==array[character]; array[character]; function functionmain(returns main(returnsstring) string) for i in array[1: 1, 4, for i in array[1: 1, 4,7]7]cross crossj jinin1,1,99cross crosskkinini,i,i+2 i+2 ss:=:=array[1: character(48+k),'x',character(48+j),'='] array[1: character(48+k),'x',character(48+j),'=']|||| ififk*j k*j<<10 10then then array[1: array[1:' '',character(48+k*j)] ',character(48+k*j)] else else array[1: array[1:character(48+k*j/10),character(48+mod(k*j,10))] character(48+k*j/10),character(48+mod(k*j,10))] end endifif|||| ififkk~= ~=i+2 i+2then then array[1: array[1:'\t'] '\t'] elseif j = 9 then elseif j = 9 then array[1: array[1:'\n','\n'] '\n','\n'] else else array[1: array[1:'\n'] '\n'] end if end if returns returns value valueofofcatenate catenatess end for end for end endfunction function
  16. Code to Code Agena Euphoria #!/usr/bin/agena #!/usr/bin/agena ## ./mt9x9.agn ./mt9x9.agn

    |||| agena agena mt9x9.agn mt9x9.agn #!/usr/bin/phix #!/usr/bin/phix ---- ./mt9x9.ex ./mt9x9.ex |||| phix phix mt9x9.ex mt9x9.ex for for ii from from 11 toto 99 by by 33 do do for for jj from from 11 toto 99 do do for k in [i, i+1, for k in [i, i+1, i+2] i+2] do do printf('%dx%d=%2d\t', printf('%dx%d=%2d\t', k,k, j,j, k*j) k*j) od; od; print() print() od; od; writeline() writeline() od; od; for for ii == 11 toto 99 by by 33 do do for for jj == 11 toto 99 do do for k = i to i+2 for k = i to i+2 do do printf(1, "%dx%d=%2d\t", printf(1, "%dx%d=%2d\t", {k,j,k*j}) {k,j,k*j}) end end for for puts(1, puts(1, "\n") "\n") end for end for puts(1, puts(1, "\n") "\n") end end for for
  17. Code to Code Caml (*(* ocamlc ocamlc mt9x9.ml mt9x9.ml &&

    && ./mt9x9 ./mt9x9 |||| ocaml ocaml mt9x9.ml mt9x9.ml *)*) for for ii == 11 toto 33 do do for for jj == 11 toto 99 do do for for kk == i*3-2 i*3-2 toto i*3 i*3 do do Printf.printf "%dx%d=%2d\t" Printf.printf "%dx%d=%2d\t" kk jj (k*j) (k*j) done; done; print_string print_string "\n" "\n" done; done; print_endline print_endline """" done; done; SML (*(* mlton mlton mt9x9.sml mt9x9.sml && && ./mt9x9 ./mt9x9 *)*) val val ii == ref ref 1;1; val j = ref val j = ref 1;1; val val kk == ref ref 1;1; while (!i while (!i <= <= 9) 9) do do (( jj := := 1;1; while while (!j(!j <= <= 9) 9) do do (( kk := !i; := !i; while while (!k (!k <= <= (!i(!i ++ 2)) 2)) do do (( print (Int.toString (!k) print (Int.toString (!k) ^^ "x" "x" ^^ Int.toString Int.toString (!j) (!j) ^^ "="); "="); print (if (!k * !j) < 10 then " " else ""); print (if (!k * !j) < 10 then " " else ""); print print (Int.toString (Int.toString (!k (!k ** !j)!j) ^^ "\t"); "\t"); kk := !k + 1 := !k + 1 );); print print "\n"; "\n"; jj := !j + := !j + 11 );); print print "\n"; "\n"; ii := !i + := !i + 33 ););
  18. Code to Code Chap //// chap chap mt9x9.chp mt9x9.chp 11

    -> -> $i$i @loop_i @loop_i 11 -> -> $j$j @loop_j @loop_j $i$i -> -> $k $k """" -> $s -> $s @loop_k @loop_k $s, $s, $k, $k, "x", "x", $j, $j, "=" "=" -> -> cat cat -> -> $s $s @if, @if, (($k, (($k, $j$j -> -> multiply), multiply), 10 10 -> -> lt)lt) -> -> jump_if_not jump_if_not $s, " " -> cat -> $s $s, " " -> cat -> $s @if @if $s, $s, ($k, ($k, $j$j -> -> multiply), multiply), "⇥" "⇥" -> -> cat cat -> -> $s $s $k $k -> -> inc inc @loop_k, @loop_k, $k, $k, ($i, ($i, 33 -> -> add) add) -> -> jump_if_not_equal jump_if_not_equal $s $s -> -> print print $j$j -> -> inc inc @loop_j, @loop_j, $j, $j, 10 10 -> -> jump_if_not_equal jump_if_not_equal """" $i, $i, 33 -> -> add add -> -> $i$i @loop_i, $i, 10 @loop_i, $i, 10 -> -> jump_if_not_equal jump_if_not_equal Kite #!/usr/bin/kite #!/usr/bin/kite ##./mt9x9.kite ./mt9x9.kite||||kite kitemt9x9.kite mt9x9.kite ii==1;1; while(i while(i<= <=9) 9)[[ jj==1;1; while(j while(j<= <=9) 9)[[ kk==i;i; ss==""; ""; until(k until(k>>2+i) 2+i)[[ ss==ss++("%dx%d=%2d\t" ("%dx%d=%2d\t"||format([k, format([k,j,j,k*j])); k*j])); kk==kk++1;1; ];]; ss||print; print; jj==jj++1;1; ];]; """"||print; print; ii==ii++3;3; ];];
  19. Code to Code Logo Boron #!/usr/bin/logo #!/usr/bin/logo ;;./mt9x9.logo ./mt9x9.logo||||logo logomt9x9.logo

    mt9x9.logo #!/usr/bin/boron #!/usr/bin/boron ;; ./mt9x9.boron ./mt9x9.boron |||| boron boron mt9x9.boron mt9x9.boron for for[i[i11993]3][[ for for[j[j119]9][[ for for[k[k:i:i:i+2] :i+2][[ (type (type:k:k"x "x:j:j"= "=form form:k*:j :k*:j2200char char9) 9) ]] (type (typechar char10) 10) ]] (print) (print) ]] bye bye foreach foreach ii [1[1 44 7]7] [[ foreach foreach jj [1[1 22 33 44 55 66 77 88 9]9] [[ foreach foreach KK [0[0 11 2]2] [[ k:k: add add ii KK prin prin rejoin rejoin [k[k 'x' 'x' jj '=' '=' format format [-2] [-2] mul mul kk jj '^-'] '^-'] ]] prin prin '^/' '^/' ]] print print """" ]]
  20. Code to Code Rebol #!/usr/bin/rebol #!/usr/bin/rebol-q -q ;;./mt9x9.r ./mt9x9.r||||rebol rebol-q

    -qmt9x9.r mt9x9.r rebol rebol[][] foreach foreachii[1[1447]7][[ repeat repeatjj99[[ for forkkii(i(i++2) 2)11[[ prin prinrejoin rejoin[k[k"x" "x"jj"=" "="either eitherkk**jj<<10 10["[""]"][""] [""]kk**jjtab] tab] ]] prin princrlf crlf ]] print print"""" ]] Red #!/usr/bin/red #!/usr/bin/red ;; ./mt9x9.red ./mt9x9.red |||| red red mt9x9.red mt9x9.red |||| ;; redc redc -c-c mt9x9.red mt9x9.red && && ./mt9x9 ./mt9x9 Red Red [][] foreach foreach ii [1[1 44 7]7] [[ repeat repeat jj 99 [[ k:k: ii loop loop 33 [[ prin prin kk prin prin "x" "x" prin prin jj prin prin "=" "=" prin either k * j < 10 [" "] [""] prin either k * j < 10 [" "] [""] prin prin kk ** jj prin prin tab tab k:k: kk ++ 11 ]] prin prin "^/" "^/" ]] print print """" ]]
  21. Code to Code C C++ //// gcc gcc mt9x9.c mt9x9.c

    -o -o mt9x9 mt9x9 && && ./mt9x9 ./mt9x9 |||| tcc tcc -run -run mt9x9.c mt9x9.c //// g++ g++ mt9x9.cpp mt9x9.cpp -o -o mt9x9 mt9x9 && && ./mt9x9 ./mt9x9 #include #include <stdio.h> <stdio.h> int int main(int main(int argc, argc, char char *argv[]) *argv[]) {{ int int i,i, j,j, k;k; for(i for(i == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(j for(j == 1;1; jj <= <= 9;9; j++) j++) {{ for(k for(k == i;i; kk <= <= i+2; i+2; k++) k++) printf("%dx%d=%2d\t", printf("%dx%d=%2d\t", k,k, j,j, k*j); k*j); printf("\n"); printf("\n"); }} putchar(10); putchar(10); }} }} #include #include <iostream> <iostream> using using namespace namespace std; std; int int main() main() {{ for(int for(int ii == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(int for(int jj == 1;1; jj <= <= 9;9; j++) j++) {{ for(int for(int k:k: {i,{i, i+1, i+1, i+2}) i+2}) printf("%dx%d=%2d\t", printf("%dx%d=%2d\t", k,k, j,j, k*j); k*j); printf("\n"); printf("\n"); }} cout cout << << endl; endl; }} }}
  22. Code to Code C# D //// mcs mcs mt9x9.cs mt9x9.cs

    && && mono mono mt9x9.exe mt9x9.exe //// ldc2 ldc2 mt9x9.d mt9x9.d && && ./mt9x9 ./mt9x9 |||| ldc2 ldc2 -run -run mt9x9.d mt9x9.d using using System; System; class Program class Program {{ static static void void Main(string[] Main(string[] args) args) {{ int int i,i, j,j, k;k; for(i for(i == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(j for(j == 1;1; jj <= <= 9;9; j++) j++) {{ for(k for(k == i;i; kk <= <= i+2; i+2; k++) k++) Console.Write("{0}x{1}={2}\t", Console.Write("{0}x{1}={2}\t", k,k, j,j, (k*j).ToString().PadLeft(2)); (k*j).ToString().PadLeft(2)); Console.Write("\n"); Console.Write("\n"); }} Console.WriteLine(); Console.WriteLine(); }} }} }} import import std.stdio; std.stdio; void void main() main() {{ int int i,i, j,j, k;k; for(i for(i == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(j for(j == 1;1; jj <= <= 9;9; j++) j++) {{ for(k for(k == i;i; kk <= <= i+2; i+2; k++) k++) writef("%dx%d=%2d\t", writef("%dx%d=%2d\t", k,k, j,j, k*j); k*j); write(char(10)); write(char(10)); }} writeln(); writeln(); }} }}
  23. Code to Code Pike #!/usr/bin/pike #!/usr/bin/pike //// ./mt9x9.pike ./mt9x9.pike ||||

    pike pike mt9x9.pike mt9x9.pike int int main() main() {{ for(int for(int ii == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(int for(int jj == 1;1; jj <= <= 9;9; j++) j++) {{ foreach(({i, foreach(({i, i+1, i+1, i+2}), i+2}), int int k)k) {{ write(k+"x"+j+"="+sprintf("%2d\t", write(k+"x"+j+"="+sprintf("%2d\t", k*j)); k*j)); }} write("\n"); write("\n"); }} write("\n"); write("\n"); }} }} Objective-C++ ////g++ g++mt9x9.mm mt9x9.mm-o-omt9x9 mt9x9-fconstant-string-class=NSConstantString -fconstant-string-class=NSConstantString\ \ -I/usr/include/GNUstep -I/usr/include/GNUstep-lobjc -lobjc-lgnustep-base -lgnustep-base #import #import<Foundation/Foundation.h> <Foundation/Foundation.h> #include #include<initializer_list> <initializer_list> int intmain() main(){ { NSAutoreleasePool NSAutoreleasePool*pool *pool==[[NSAutoreleasePool [[NSAutoreleasePoolalloc] alloc]init]; init]; NSFileHandle NSFileHandle*standardOutput *standardOutput==[NSFileHandle [NSFileHandlefileHandleWithStandardOutput]; fileHandleWithStandardOutput]; for(NSInteger for(NSIntegeri i==1;1;i i<= <=9;9;i i+= +=3)3){ { for(NSUInteger for(NSUIntegerj j==1;1;j j<= <=9;9;j++) j++){ { for(NSUInteger for(NSUIntegerkk: :{i,{i,i+1, i+1,i+2}) i+2}){ { [standardOutput [standardOutputwriteData:[[NSString writeData:[[NSStringstringWithFormat:@"%d", stringWithFormat:@"%d",k]k] dataUsingEncoding:NSUTF8StringEncoding]]; dataUsingEncoding:NSUTF8StringEncoding]]; [standardOutput [standardOutputwriteData:[@"x" writeData:[@"x"dataUsingEncoding:NSUTF8StringEncoding]]; dataUsingEncoding:NSUTF8StringEncoding]]; [standardOutput [standardOutputwriteData:[[NSString writeData:[[NSStringstringWithFormat:@"%d", stringWithFormat:@"%d",j]j] dataUsingEncoding:NSUTF8StringEncoding]]; dataUsingEncoding:NSUTF8StringEncoding]]; [standardOutput [standardOutputwriteData:[@"=" writeData:[@"="dataUsingEncoding:NSUTF8StringEncoding]]; dataUsingEncoding:NSUTF8StringEncoding]]; [standardOutput [standardOutputwriteData:[[NSString writeData:[[NSStringstringWithFormat:@"%2d", stringWithFormat:@"%2d",k*j] k*j] dataUsingEncoding:NSUTF8StringEncoding]]; dataUsingEncoding:NSUTF8StringEncoding]]; [standardOutput writeData:[@"\t" dataUsingEncoding:NSUTF8StringEncoding]]; [standardOutput writeData:[@"\t" dataUsingEncoding:NSUTF8StringEncoding]]; }} [standardOutput [standardOutputwriteData:[@"\n" writeData:[@"\n"dataUsingEncoding:NSUTF8StringEncoding]]; dataUsingEncoding:NSUTF8StringEncoding]]; }} [standardOutput writeData:[@"\n" dataUsingEncoding:NSUTF8StringEncoding]]; [standardOutput writeData:[@"\n" dataUsingEncoding:NSUTF8StringEncoding]]; }} }}
  24. Code to Code Muon ////muon muon/usr/share/muon/lib/core.mu /usr/share/muon/lib/core.mumt9x9.mu mt9x9.mu;; ////gcc gcc-I/usr/share/muon/examples

    -I/usr/share/muon/examples-o -omt9x9 mt9x9out.c out.c;;./mt9x9 ./mt9x9 printf(fmt printf(fmtcstring) cstring)int int#Foreign("printf") #Foreign("printf")#VarArgs #VarArgs main() main(){{ for forii:= :=1;1;ii<<10; 10;i+=3 i+=3{{ for forjj:= :=1;1;jj<= <=99{{ for forkk:= :=i;i;kk<= <=i+2 i+2{{ printf("%dx%d=%2d\t", printf("%dx%d=%2d\t",k,k,j,j,k*j) k*j) }} printf("\n") printf("\n") }} printf("\n") printf("\n") }} }} V //// vv mt9x9.v mt9x9.v && && ./mt9x9 ./mt9x9 |||| vv run run mt9x9.v mt9x9.v fnfn main() main() {{ for for ii := := 1;1; ii <= <= 9;9; ii += += 33 {{ for for jj inin 1..10 1..10 {{ for for kk inin [i,[i, i+1, i+1, i+2] i+2] {{ print('${k}x${j}=${k*j:2}\t') print('${k}x${j}=${k*j:2}\t') }} print('\n') print('\n') }} println('') println('') }} }}
  25. Code to Code Carbon //// carbon mt9x9.carbon carbon compile compile

    mt9x9.carbon && && //// carbon carbon link link mt9x9.o mt9x9.o --output=mt9x9 --output=mt9x9 && && ./mt9x9 ./mt9x9 import Core library Core library "io"; "io"; fnimport Run() { fn var Run() { == 1;1; var i:i: i32 i32 while (i <= {{ while <= 9) 9) var j:(ij: i32 == 1; var i32 1;{ while (j(j <= 9) while <= 9) var k:k: i32 =={i;i; var i32 while (k(k <= while <= i+2) i+2) {{ Core.PrintChar(k+48); Core.PrintChar(k+48); Core.PrintChar(120); Core.PrintChar(120); Core.PrintChar(j+48); Core.PrintChar(j+48); Core.PrintChar(61); Core.PrintChar(61); var s:s: i32 == k*j/10; i32 ifvar == 0) {{ k*j/10; if (s(s == 0) Core.PrintChar(32); Core.PrintChar(32); }} else {{ else Core.PrintChar(s+48); Core.PrintChar(s+48); }} Core.PrintChar(((k*j)%10)+48); Core.PrintChar(((k*j)%10)+48); Core.PrintChar(9); Core.PrintChar(9); ++k; }} ++k; Core.PrintChar(10); Core.PrintChar(10); ++j; }} ++j; Core.PrintChar(10); iCore.PrintChar(10); += 3; }} i += 3; }} Cangjie //// cjc cjc mt9x9.cj mt9x9.cj -o -o mt9x9 mt9x9 && && ./mt9x9 ./mt9x9 main() main() {{ var var i:i: Int64 Int64 == 11 while while (i(i <= <= 9) 9) {{ for for (j(j inin 1..10) 1..10) {{ for (k for (k inin [i,[i, i+1, i+1, i+2]) i+2]) {{ print("${k}x${j}=") print("${k}x${j}=") ifif (k*j (k*j << 10) 10) {print(" {print(" ")} ")} print("${k*j}\t") print("${k*j}\t") }} print("\n") print("\n") }} println() println() ii += += 33 }} }}
  26. Code to Code Koto Rust //// rustc rustc mt9x9.rs mt9x9.rs

    && && ./mt9x9 ./mt9x9 fnfn main() main() {{ for for ii inin (1..10).step_by(3) (1..10).step_by(3) {{ for for jj inin 1..10 1..10 {{ for for kk inin &[i, &[i, i+1, i+1, i+2] i+2] {{ print!("{}x{}={:2}\t", print!("{}x{}={:2}\t", k,k, j,j, k*j); k*j); }} print!("\n"); print!("\n"); }} println!(); println!(); }} }} #!/usr/bin/koto #!/usr/bin/koto ## koto koto mt9x9.koto mt9x9.koto @main @main == |||| for for ii inin (0..3).each (0..3).each |n| |n| n*3+1 n*3+1 for j in 1..=9 for j in 1..=9 ss == """" for for kk inin [i,[i, i+1, i+1, i+2] i+2] ss += "${k}x${j}=" += "${k}x${j}=" ss += += "${if "${if k*j<10 k*j<10 then then ' ' ' ' else else ''}" ''}" ss += += "${k*j}\t" "${k*j}\t" print print ss print print """"
  27. Code to Code Zimbu Zig /*/* zimbu zimbu mt9x9.zu mt9x9.zu

    && && ./mt9x9 ./mt9x9 |||| zimbu zimbu mt9x9.zu mt9x9.zu -x-x */*/ //// zig zig build-exe build-exe mt9x9.zig mt9x9.zig && && ./mt9x9 ./mt9x9 |||| zig zig run run mt9x9.zig mt9x9.zig FUNC FUNC Main() Main() int int FOR FOR ii IN IN 11 UNTIL UNTIL 99 STEP STEP 33 FOR FOR jj IN IN 11 TO TO 99 FOR FOR kk IN IN [i,[i, ii ++ 1,1, ii ++ 2]2] IO.write(k.ToString() IO.write(k.ToString() .... "x" "x" .... j.ToString() j.ToString() .... "=") "=") IO.write(k IO.write(k ** jj << 10 10 ?? "" "" :: "") "") IO.write((k * j).ToString() IO.write((k * j).ToString() .... "\t") "\t") }} IO.write("\n") IO.write("\n") }} IO.print() IO.print() }} RETURN RETURN 00 const const std std == @import("std"); @import("std"); pub fn main() pub fn main() !void !void {{ var var i:i: u8 u8 == 1;1; while while (i(i <= <= 9) 9) :: (i(i += += 3) 3) {{ var j: u8 = 1; var j: u8 = 1; while while (j(j <= <= 9) 9) :: (j(j += += 1) 1) {{ for for ([_]u8{i, ([_]u8{i, i+1, i+1, i+2}) i+2}) |k| |k| {{ std.debug.print("{d}x{d}={d: std.debug.print("{d}x{d}={d: >2}\t", >2}\t", .{k, .{k, j,j, k*j}); k*j}); }} std.debug.print("\n", std.debug.print("\n", .{}); .{}); }} std.debug.print("\n", std.debug.print("\n", .{}); .{}); }} }}
  28. Code to Code Go Odin //// go go build build

    mt9x9.go mt9x9.go && && ./mt9x9 ./mt9x9 |||| go go run run mt9x9.go mt9x9.go //// odin-lang odin-lang build build mt9x9.odin mt9x9.odin -file -file && && ./mt9x9.bin ./mt9x9.bin package package main main import import "fmt" "fmt" func func main() main() {{ for for ii := := 1;1; ii <= <= 9;9; ii += += 33 {{ for for jj := := 1;1; jj <= <= 9;9; j++ j++ {{ for for _,_, kk := := range range []int{i, []int{i, i+1, i+1, i+2} i+2} {{ fmt.Printf("%dx%d=%2d\t", fmt.Printf("%dx%d=%2d\t", k,k, j,j, k*j) k*j) }} fmt.Printf("\n") fmt.Printf("\n") }} println() println() }} }} package package mt9x9 mt9x9 import "core:fmt" import "core:fmt" main main :::: proc() proc() {{ for for ii := := 1;1; ii <= <= 9;9; ii += += 33 {{ for j in 1..=9 { for j in 1..=9 { for for kk inin ([]int{i, ([]int{i, i+1, i+1, i+2}) i+2}) {{ fmt.printf("%dx%d=", fmt.printf("%dx%d=", k,k, j);j); ifif k*j<10 k*j<10 do do fmt.print(" fmt.print(" "); "); fmt.printf("%d\t", k*j); fmt.printf("%d\t", k*j); }} fmt.print("\n"); fmt.print("\n"); }} fmt.println(); fmt.println(); }} }}
  29. Code to Code Pawn Vala //// pawncc pawncc mt9x9.p mt9x9.p

    && && pawnrun pawnrun mt9x9.amx mt9x9.amx //// valac valac mt9x9.vala mt9x9.vala && && ./mt9x9 ./mt9x9 main() main() {{ for for (new (new ii == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for for (new (new jj == 1;1; jj <= <= 9;9; j++) j++) {{ for for (new (new kk == i;i; kk <= <= i+2; i+2; k++) k++) {{ printf printf "%dx%d=%2d\t", "%dx%d=%2d\t", k,k, j,j, k*j k*j }} printf printf "\n" "\n" }} print print "\n" "\n" }} }} void void main() main() {{ for(int for(int ii == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(int for(int jj == 1;1; jj <= <= 9;9; j++) j++) {{ int[] int[] KK == {i,{i, i+1, i+1, i+2}; i+2}; foreach(int k in K) foreach(int k in K) stdout.printf("%dx%d=%2d\t", stdout.printf("%dx%d=%2d\t", k,k, j,j, k*j); k*j); print("\n"); print("\n"); }} stdout.putc('\n'); stdout.putc('\n'); }} }}
  30. Code to Code Umka //// umka umka mt9x9.um mt9x9.um fnfn

    main() main() {{ for for ii := := 1;1; ii <= <= 9;9; ii += += 33 {{ for for jj := := 1;1; jj <= <= 9;9; j++ j++ {{ for for kk inin [3]int{i, [3]int{i, i+1, i+1, i+2} i+2} {{ printf("%dx%d=%2d\t", printf("%dx%d=%2d\t", k,k, j,j, k*j) k*j) }} printf("\n") printf("\n") }} printf("\n") printf("\n") }} }} Never #!/usr/bin/never #!/usr/bin/never -f-f ## ./mt9x9.nev ./mt9x9.nev |||| never never -f-f mt9x9.nev mt9x9.nev func func main() main() -> -> int int {{ var var ii == 0;0; for for (i(i == 1;1; ii <= <= 9;9; ii == i+3) i+3) {{ var var jj == 0;0; for for (j(j == 1;1; jj <= <= 9;9; jj == j+1) j+1) {{ var var kk == 0;0; for for (k(k == i;i; kk <= <= i+2; i+2; kk == k+1) k+1) {{ prints(k prints(k ++ "x" "x" ++ jj ++ "="); "="); ifif (k*j (k*j << 10) 10) {prints(" {prints(" ")} ")} else else {prints("")}; {prints("")}; prints(k*j prints(k*j ++ "\t") "\t") };}; prints("\n") prints("\n") };}; prints("\n") prints("\n") }} }}
  31. Code to Code Adept SurgeScript //// adept adept mt9x9.adept mt9x9.adept

    && && ./mt9x9 ./mt9x9 ////surgescript surgescriptmt9x9.ss mt9x9.ss import import basics basics func main func main {{ for(i for(i int int == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(j for(j int int == 1;1; jj <= <= 9;9; j++) j++) {{ each int in {i, i+1, each int in {i, i+1, i+2} i+2} {{ printf("%dx%d=", printf("%dx%d=", it,it, j)j) ifif it*j it*j << 10, 10, putchar(0x20) putchar(0x20) printf("%d\t", printf("%d\t", it*j) it*j) }} place('\n') place('\n') }} print('') print('') }} }} object object"Application" "Application"{{ state state"main" "main"{{ for(i for(i==1;1;i i<= <=9;9;i i+= +=3) 3){{ for(j for(j==1;1;j j<= <=9;9;j++) j++){{ foreach(k in [i, foreach(k in [i,i+1, i+1,i+2]) i+2]){{ Console.write(k+"x"+j+"="+(k*j<10?" Console.write(k+"x"+j+"="+(k*j<10?"":"")+k*j+"\t"); ":"")+k*j+"\t"); }} Console.write("\n"); Console.write("\n"); }} Console.print(""); Console.print(""); }} Application.exit(); Application.exit(); }} }}
  32. Code to Code Jack //// dcc dcc mt9x9.jack mt9x9.jack &&

    && jackvm jackvm mt9x9.vm mt9x9.vm class class Main Main {{ function function void void main() main() {{ var int i, j, k; var int i, j, k; let let ii == 1;1; while(i while(i << 10) 10) {{ let let jj == 1;1; while(j while(j << 10) 10) {{ let let kk == i;i; while(k while(k << (i+3)) (i+3)) {{ do Output.printf("%dx%d=", do Output.printf("%dx%d=", k,k, j);j); if((k*j) if((k*j) << 10) 10) {{ do Output.printf(" do Output.printf(" "); "); }} do do Output.printf("%d\t", Output.printf("%d\t", k*j); k*j); let let kk == kk ++ 1;1; }} let let jj == jj ++ 1;1; do do Output.printf("\n"); Output.printf("\n"); }} let let ii == ii ++ 3;3; do do Output.printf("\n"); Output.printf("\n"); }} return; return; }} }} Copper ////copper coppermt9x9.co mt9x9.co-o-omt9x9 mt9x9&& &&./mt9x9 ./mt9x9 import import"std" "std" function functionmain main var vari i==Int8: Int8:11 while i <= while i <=99 var varj j::Int8 Int8 (Int8: (Int8:9).each 9).eachdo doj j j j++ ++ var varss==String: String:"\ax\a=\a\a\t\ax\a=\a\a\t\ax\a=\a\a" "\ax\a=\a\a\t\ax\a=\a\a\t\ax\a=\a\a" var s0 = var s0 =String: String:(i*j<10 (i*j<10then then""""else else"") "") var s1 = String: ((i+1)*j<10 then var s1 = String: ((i+1)*j<10 then""""else else"") "") var vars2 s2==String: String:((i+2)*j<10 ((i+2)*j<10then then""""else else"") "") Console.printFormat(s,i,j,s0,i*j,i+1,j,s1,(i+1)*j,i+2,j,s2,(i+2)*j) Console.printFormat(s,i,j,s0,i*j,i+1,j,s1,(i+1)*j,i+2,j,s2,(i+2)*j) end end Console.write("\n") Console.write("\n") i i+= +=33 end end end end
  33. Code to Code Elena Hare //// elena64-cli elena64-cli mt9x9.l mt9x9.l

    && && ./mt9x9 ./mt9x9 //// hare hare build build mt9x9.ha mt9x9.ha && && ./mt9x9 ./mt9x9 |||| hare hare run run mt9x9.ha mt9x9.ha import import extensions; extensions; public program() public program() {{ for(int for(int ii := := 1,1, ii <= <= 9,9, ii += += 3) 3) {{ for(int for(int jj := := 1,1, jj <= <= 9,9, jj += += 1) 1) {{ for(int k := i, k <= i+2, k for(int k := i, k <= i+2, k += += 1) 1) {{ console console .print(k, .print(k, "x", "x", j,j, "=") "=") .print((10 .print((10 >> k*j).iif(" k*j).iif(" ",", "")) "")) .print(k*j, $9) .print(k*j, $9) };}; console.printLine() console.printLine() };}; console.writeLine() console.writeLine() };}; }} use use fmt; fmt; export export fnfn main() main() void void == {{ for for (let (let ii == 1z; 1z; ii <= <= 9;9; ii += += 3) 3) {{ for for (let (let jj == 1z; 1z; jj <= <= 9;9; jj += += 1) 1) {{ for for (let (let kk == i;i; kk <= <= i+2; i+2; kk += += 1) 1) {{ fmt::printf("{}x{}={:2}\t", fmt::printf("{}x{}={:2}\t", k,k, j,j, k*j)!; k*j)!; };}; fmt::print("\n")!; fmt::print("\n")!; };}; fmt::println()!; fmt::println()!; };}; };};
  34. Code to Code Wa #!/usr/bin/wa #!/usr/bin/wa //// wa wa run

    run mt9x9.wa mt9x9.wa func func main main {{ for for ii := := 1;1; ii <= <= 9;9; ii += += 33 {{ j:j: int int for for JJ := := range range make([]int, make([]int, 9) 9) {{ jj == JJ ++ 11 for for kk := := i;i; kk <= <= i+2; i+2; k++ k++ {{ print(string(k+48)+"x"+string(j+48)+"=") print(string(k+48)+"x"+string(j+48)+"=") ifif k*j k*j << 10 10 {{ print(' print(' ')') }} print(k*j) print(k*j) print('\t') print('\t') }} print('\n') print('\n') }} println() println() }} }} Objeck ##objeckc objeckc-src -srcmt9x9.obs mt9x9.obs-dest -destmt9x9.obe mt9x9.obe&& &&objeckr objeckrmt9x9.obe mt9x9.obe class classmt9x9 mt9x9{{ function function::Main(args Main(args::String[]) String[])~~Nil Nil{{ for(i for(i:=:=1;1;i i<= <=9;9;i i+= +=3;) 3;){{ for(j for(j:=:=1;1;j j<= <=9;9;j j+= +=1;) 1;){{ for(k := i; k <= i+2; k++;) for(k := i; k <= i+2; k++;){{ IO.Console->Print(k)->Print('x')->Print(j)->Print('='); IO.Console->Print(k)->Print('x')->Print(j)->Print('='); if(k*j<10) if(k*j<10){IO.Console->Print(' {IO.Console->Print('');}; ');}; IO.Console->Print(k*j)->Print('\t'); IO.Console->Print(k*j)->Print('\t'); };}; '\n'->Print(); '\n'->Print(); };}; ""->PrintLine(); ""->PrintLine(); };}; }} }}
  35. Code to Code ActionScript //// as3shebang as3shebang mt9x9.as3 mt9x9.as3 for(var

    for(var i:uint i:uint == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(var for(var j:uint j:uint == 1;1; jj <= <= 9;9; j++) j++) {{ var var s:String s:String == ""; ""; for(var k:uint = for(var k:uint = i;i; kk <= <= i+2; i+2; k++) k++) ss += k+"x"+j+"="+(" "+k*j).slice(-2)+"\t"; += k+"x"+j+"="+(" "+k*j).slice(-2)+"\t"; trace(s); trace(s); }} trace(); trace(); }} JavaScript #!/usr/bin/gjs #!/usr/bin/gjs //// ./mt9x9.js ./mt9x9.js |||| gjs gjs mt9x9.js mt9x9.js for(var for(var ii == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(var for(var jj == 1;1; jj <= <= 9;9; j++) j++) print( print( [i,[i, i+1, i+1, i+2].map( i+2].map( kk => => k+'x'+j+'='+(' k+'x'+j+'='+(' '+k*j).slice(-2) '+k*j).slice(-2) ).join('\t') ).join('\t') )) print() print() }}
  36. Code to Code TypeScript Dart #!/usr/bin/deno #!/usr/bin/deno run run ////

    deno compile mt9x9.ts deno compile mt9x9.ts && && ./mt9x9 ./mt9x9 |||| //// ./mt9x9.ts ./mt9x9.ts |||| deno deno run run mt9x9.ts mt9x9.ts #!/usr/bin/dart #!/usr/bin/dart //// dart dart compile compile exe exe mt9x9.dart mt9x9.dart -o -o mt9x9 mt9x9 && && ./mt9x9 ./mt9x9 |||| //// dart dart mt9x9.dart mt9x9.dart |||| ./mt9x9.dart ./mt9x9.dart for(let for(let i:number i:number == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(let for(let j:number j:number == 1;1; jj <= <= 9;9; j++) j++) console.log( console.log( [i,[i, i+1, i+1, i+2].map( i+2].map( kk => => k+'x'+j+'='+(' k+'x'+j+'='+(' '+k*j).slice(-2) '+k*j).slice(-2) ).join('\t') ).join('\t') )) console.log() console.log() }} import import 'dart:io'; 'dart:io'; main() main() {{ for(int for(int ii == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(int for(int jj == 1;1; jj <=9; <=9; j++) j++) {{ [i,[i, i+1, i+1, i+2].forEach((k) i+2].forEach((k) => => stdout.write('${k}x${j}=${k*j<10?" stdout.write('${k}x${j}=${k*j<10?" ":""}${k*j}\t') ":""}${k*j}\t') );); stdout.write('\n'); stdout.write('\n'); }} print(''); print(''); }} }}
  37. Code to Code AviatorScript ## ## aviator aviator mt9x9.av mt9x9.av

    for for ii inin range(1, range(1, 9,9, 3) 3) {{ for for jj inin range(1, range(1, 10) 10) {{ for for kk inin tuple(i, tuple(i, i+1, i+1, i+2) i+2) {{ print(k+"x"+j+"="+(k*j<10?" print(k+"x"+j+"="+(k*j<10?" ":"")+k*j+"\t"); ":"")+k*j+"\t"); }} println(); println(); }} ifif ii << 77 {p();} {p();} }} return return ""; ""; BeanShell #!/usr/bin/bsh #!/usr/bin/bsh //// ./mt9x9.bsh ./mt9x9.bsh |||| bsh bsh mt9x9.bsh mt9x9.bsh for(i for(i == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(j for(j == 1;1; jj <= <= 9;9; j++) j++) {{ for(k: for(k: new new int[]{i, int[]{i, i+1, i+1, i+2}) i+2}) System.out.printf("%dx%d=%2d\t", System.out.printf("%dx%d=%2d\t", k,k, j,j, k*j); k*j); System.out.printf("\n"); System.out.printf("\n"); }} System.out.println(); System.out.println(); }}
  38. Code to Code Java //// javac javac mt9x9.java mt9x9.java &&

    && java java mt9x9 mt9x9 public public class class mt9x9 mt9x9 {{ public public static static void void main(String main(String args[]) args[]) {{ for(int for(int ii == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(int for(int jj == 1;1; jj <= <= 9;9; j++) j++) {{ for(int for(int k:k: new new int[]{i, int[]{i, i+1, i+1, i+2}) i+2}) System.out.printf("%dx%d=%2d\t", System.out.printf("%dx%d=%2d\t", k,k, j,j, k*j); k*j); System.out.printf("\n"); System.out.printf("\n"); }} System.out.println(); System.out.println(); }} }} }} Fantom #!/usr/bin/fan #!/usr/bin/fan //// ./mt9x9.fan ./mt9x9.fan |||| fan fan mt9x9.fan mt9x9.fan class class mt9x9 mt9x9 {{ static static Void Void main() main() {{ for(i for(i := := 1;1; ii << 9;9; ii += += 3) 3) {{ for(j := 1; j <= 9; j++) for(j := 1; j <= 9; j++) {{ [i,[i, i+1, i+1, i+2].each i+2].each |Int |Int k|k| {{ Env.cur.out.print(k.toStr+"x"+j.toStr+"="+ Env.cur.out.print(k.toStr+"x"+j.toStr+"="+ (k*j).toStr.padl(2,' (k*j).toStr.padl(2,' ')+"\t") ')+"\t") }} Env.cur.out.printLine() Env.cur.out.printLine() }} echo() echo() }} }} }}
  39. Code to Code Scala Kotlin //// scalac scalac mt9x9.scala mt9x9.scala

    && && scala scala mt9x9 mt9x9 //// kotlinc-native kotlinc-native -o -o mt9x9 mt9x9 mt9x9.kt mt9x9.kt && && ./mt9x9.kexe ./mt9x9.kexe object object mt9x9 mt9x9 {{ def def main(args: main(args: Array[String]) Array[String]) == {{ for for (i(i <<- 11 toto 99 by by 3) 3) {{ for for (j(j <<- 11 toto 9) 9) {{ List(i, List(i, i+1, i+1, i+2).foreach i+2).foreach {{ kk => => print(k+"x"+j+"="+f"${k*j}%2d"+"\t") print(k+"x"+j+"="+f"${k*j}%2d"+"\t") }} println() println() }} println() println() }} }} }} fun fun main() main() {{ for for (i(i inin 1..9 1..9 step step 3) 3) {{ for for (j(j inin 1..9) 1..9) {{ (i..i+2).forEach (i..i+2).forEach {{ print("${it}x${j}=") print("${it}x${j}=") print((it*j).toString().padStart(2) print((it*j).toString().padStart(2) ++ "\t") "\t") }} print("\n") print("\n") }} println() println() }} }}
  40. Code to Code Groovy #!/usr/bin/groovy #!/usr/bin/groovy //// ./mt9x9.groovy ./mt9x9.groovy ||||

    groovy groovy mt9x9.groovy mt9x9.groovy for(i for(i inin (1..9).step(3)) (1..9).step(3)) {{ for(j for(j inin 1..9) 1..9) {{ for(k for(k inin [i,[i, i+1, i+1, i+2]) i+2]) {{ printf("%dx%d=%2d\t", printf("%dx%d=%2d\t", k,k, j,j, k*j) k*j) }} println() println() }} println println """" }} Ceylon ////ceylon ceyloncompile compile--src --src..mt9x9.ceylon mt9x9.ceylon&& &&ceylon ceylonrun rundefault default shared sharedvoid voidrun() run(){{ for(i for(iinin(1..9).by(3)) (1..9).by(3)){{ for(j for(jinin1..9) 1..9){{ for(k for(kinin[i,[i,i+1, i+1,i+2]) i+2]){{ process.write("``k``x``j``="); process.write("``k``x``j``="); process.write("``k*j<10 process.write("``k*j<10then then""""else else""````k*j``\t"); ""````k*j``\t"); }} print(""); print(""); }} print(""); print(""); }} }}
  41. Code to Code Fortress X10 (*(* fortress fortress mt9x9.fss mt9x9.fss

    *)*) ////x10c x10cmt9x9.x10 mt9x9.x10&& &&x10 x10mt9x9 mt9x9 component component mt9x9 mt9x9 export Executable export Executable run() run() == for for ii <<- seq(1:9:3) seq(1:9:3) do do for for jj <<- seq(1#9) seq(1#9) do do var var k:k: ZZ32 ZZ32 == ii while while kk <= <= i+2 i+2 do do print k "x" j "=" print k "x" j "=" print print (if(if (k(k j)j) << 10 10 then then "" "" else else "") "") print (k j) "\t" print (k j) "\t" kk += += 11 end end print print "\n" "\n" end end println println """" end end end end import importx10.io.Console; x10.io.Console; class mt9x9 class mt9x9{{ public publicstatic staticdef defmain(args:Rail[String]):void main(args:Rail[String]):void{{ for (var i:Int = 1n; for (var i:Int = 1n;ii<= <=9n; 9n;ii+= +=3n) 3n){{ for for(j(jinin1..9) 1..9){{ for (k for (kinin[i,[i,i+1n, i+1n,i+2n]) i+2n]){{ Console.OUT.printf("%dx%d=%2d\t", Console.OUT.printf("%dx%d=%2d\t",k,k,j,j,k*j); k*j); }} Console.OUT.print("\n"); Console.OUT.print("\n"); }} Console.OUT.println(); Console.OUT.println(); }} }} }}
  42. Code to Code Flix //// java java -jar -jar flix.jar

    flix.jar mt9x9.flix mt9x9.flix def def main(): main(): Unit Unit \\ IO IO == foreach(i foreach(i <<- List#{1, List#{1, 4,4, 7}) 7}) {{ foreach(j foreach(j <<- List.range(1, List.range(1, 10)) 10)) {{ let let s0 s0 == ifif (i*j (i*j << 10) 10) "" "" else else ""; ""; let s1 = if ((i+1)*j < 10) " " else let s1 = if ((i+1)*j < 10) " " else ""; ""; let let s2 s2 == ifif ((i+2)*j ((i+2)*j << 10) 10) "" "" else else ""; ""; println("${i}x${j}=${s0}${i*j}\t${i+1}x${j}= println("${i}x${j}=${s0}${i*j}\t${i+1}x${j}= ${s1}${(i+1)*j}\t${i+2}x${j}=${s2}${(i+2)*j}") ${s1}${(i+1)*j}\t${i+2}x${j}=${s2}${(i+2)*j}") };}; println("") println("") }} Golo #!/usr/bin/golosh #!/usr/bin/golosh ## ./mt9x9.golo ./mt9x9.golo |||| golosh golosh mt9x9.golo mt9x9.golo module module mt9x9 mt9x9 function function main main == |args| |args| {{ for for (var (var ii == 1,1, ii <= <= 9,9, ii == i+3) i+3) {{ foreach foreach jj inin range(1, range(1, 10) 10) {{ foreach foreach kk inin [i..i+3] [i..i+3] {{ print(k+"x"+j+"="+"%2d":format(k*j)+"\t") print(k+"x"+j+"="+"%2d":format(k*j)+"\t") }} print("\n") print("\n") }} println("") println("") }} }}
  43. Code to Code Perl Raku #!/usr/bin/perl #!/usr/bin/perl ## ./mt9x9.pl ./mt9x9.pl

    |||| perl perl mt9x9.pl mt9x9.pl #!/usr/bin/rakudo #!/usr/bin/rakudo ## ./mt9x9.raku ./mt9x9.raku |||| rakudo rakudo mt9x9.raku mt9x9.raku for for (my (my $i$i == 1;1; $i$i <= <= 9;9; $i$i += += 3) 3) {{ for for (my (my $j$j == 1;1; $j$j <= <= 9;9; $j++) $j++) {{ foreach foreach my my $k $k ($i..$i+2) ($i..$i+2) {{ printf("%dx%d=%2d\t", printf("%dx%d=%2d\t", $k, $k, $j, $j, $k*$j); $k*$j); }} printf("\n"); printf("\n"); }} print print "\n"; "\n"; }} for for 1,4,7 1,4,7 -> -> $i$i {{ for for 1..9 1..9 -> -> $j$j {{ for for $i, $i, $i+1, $i+1, $i+2 $i+2 -> -> $k $k {{ printf printf "%dx%d=%2d\t", "%dx%d=%2d\t", $k, $k, $j, $j, $k*$j; $k*$j; }} print print "\n"; "\n"; }} say say ""; ""; }}
  44. Code to Code ChaiScript //// chai chai mt9x9.chai mt9x9.chai for(var

    for(var ii == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(var for(var jj == 1;1; jj <= <= 9;9; ++j) ++j) {{ for(k: for(k: [i,[i, i+1, i+1, i+2]) i+2]) {{ puts("${k}x${j}="); puts("${k}x${j}="); if(k*j if(k*j << 10) 10) {puts(" {puts(" ");} ");} puts("${k*j}\t"); puts("${k*j}\t"); }} puts("\n"); puts("\n"); }} print(""); print(""); }} Sidef #!/usr/bin/sidef #!/usr/bin/sidef ## ./mt9x9.sf ./mt9x9.sf |||| sidef sidef mt9x9.sf mt9x9.sf for for (var (var ii == 1;1; ii <= <= 9;9; i+=3) i+=3) {{ for for (1 (1 ..^ ..^ 10) 10) {{ |j||j| for for kk inin [i,[i, i+1, i+1, i+2] i+2] {{ printf("%dx%d=%2d\t", printf("%dx%d=%2d\t", k,k, j,j, k*j); k*j); }} print("\n"); print("\n"); }} say(); say(); }}
  45. Code to Code DINO Sage //// dinolang dinolang mt9x9.dino mt9x9.dino

    #!/usr/bin/sagelang #!/usr/bin/sagelang //// ./mt9x9.sg ./mt9x9.sg |||| sagelang sagelang mt9x9.sg mt9x9.sg for for (var (var ii == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for for (var (var jj == 1;1; jj <= <= 9;9; j++) j++) {{ for for (var (var kk == i;i; kk <= <= i+2; i+2; k++) k++) {{ put put (k(k @ @ "x" "x" @ @ jj @ @ "="); "="); put (k*j<10?" ":"", k*j, put (k*j<10?" ":"", k*j, "\t"); "\t"); }} put put ("\n"); ("\n"); }} putln putln (); (); }} for for let let mut mut ii == 1;1; ii <= <= 9;9; ii += += 33 {{ for let mut j = 1; j <= 9; for let mut j = 1; j <= 9; jj += += 11 {{ for for let let mut mut kk == i;i; kk <= <= i+2; i+2; kk += += 11 {{ print(k, print(k, 'x', 'x', j,j, '='); '='); ifif (k*j (k*j << 10) 10) {{ print(' print(' ');'); }} print(k*j, print(k*j, '\t'); '\t'); }} print('\n'); print('\n'); }} println(); println(); }}
  46. Code to Code Odo Aime #!/usr/bin/odo #!/usr/bin/odo ## ./mt9x9.odo ./mt9x9.odo

    |||| odo odo mt9x9.odo mt9x9.odo #!/usr/bin/aime #!/usr/bin/aime ## ./mt9x9.aime ./mt9x9.aime |||| aime aime mt9x9.aime mt9x9.aime foreach foreach ii :: [1, [1, 4,4, 7]7] {{ forange forange jj :: 1,1, 10 10 {{ forange forange kk :: i,i, i+3 i+3 {{ write(k, write(k, "x", "x", j,j, "=") "=") ifif k*j k*j << 10 10 {write(" {write(" ")} ")} write(k*j, "\t") write(k*j, "\t") }} write("\n") write("\n") }} writeln() writeln() }} integer integer i,i, j,j, k;k; for for (,i(,i inin list(1, list(1, 4,4, 7)) 7)) {{ jj == 1;1; while while (j(j <= <= 9) 9) {{ for for (,k (,k inin list(i, list(i, i+1, i+1, i+2)) i+2)) {{ o_(k, o_(k, "x", "x", j,j, "="); "="); o_winteger(2, o_winteger(2, k*j); k*j); o_text("\t"); o_text("\t"); }} o_text("\n"); o_text("\n"); jj += += 1;1; }} o_newline(); o_newline(); }}
  47. Code to Code S-Lang Lua #!/usr/bin/slsh #!/usr/bin/slsh % % ./mt9x9.sl

    ./mt9x9.sl |||| slsh slsh mt9x9.sl mt9x9.sl #!/usr/bin/lua #!/usr/bin/lua ---- ./mt9x9.lua ./mt9x9.lua |||| lua lua mt9x9.lua mt9x9.lua variable variable i,i, j,j, k;k; foreach foreach ii ([1:9:3]) ([1:9:3]) {{ foreach foreach jj ([1:9]) ([1:9]) {{ foreach foreach kk ([i, ([i, i+1, i+1, i+2]) i+2]) {{ printf("%dx%d=%2d\t", printf("%dx%d=%2d\t", k,k, j,j, k*j); k*j); }} fprintf(stdout, fprintf(stdout, "\n"); "\n"); }} fputs("\n", fputs("\n", stdout); stdout); }} for for ii == 1,9,3 1,9,3 do do for for jj == 1,9 1,9 do do for k = i,i+2 for k = i,i+2 do do io.write(string.format('%dx%d=%2d\t', io.write(string.format('%dx%d=%2d\t', k,k, j,j, k*j)) k*j)) end end io.write('\n') io.write('\n') end end print() print() end end
  48. Code to Code TCL REXX #!/usr/bin/tclsh #!/usr/bin/tclsh ## ./mt9x9.tcl ./mt9x9.tcl

    |||| tclsh tclsh mt9x9.tcl mt9x9.tcl #!/usr/bin/rexx #!/usr/bin/rexx ---- ./mt9x9.rex ./mt9x9.rex |||| rexx rexx mt9x9.rex mt9x9.rex for for {set {set ii 1} 1} {$i {$i <= <= 9} 9} {incr {incr ii 3} 3} {{ for for {set {set jj 1} 1} {$j {$j <= <= 9} 9} {incr {incr j}j} {{ for for {set {set kk $i} $i} {$k {$k <= <= $i+2} $i+2} {incr {incr k}k} {{ puts puts -nonewline -nonewline [[ format format "%dx%d=%2d\t" "%dx%d=%2d\t" $k $k $j$j [expr [expr {$k*$j}] {$k*$j}] ]] }} puts puts -nonewline -nonewline "\n" "\n" }} puts puts """" }} loop loop ii == 11 toto 99 by by 33 loop loop jj == 11 toto 99 loop loop kk == ii toto i+2 i+2 .output~charout(k"x"j"="format(k*j, .output~charout(k"x"j"="format(k*j, 2)"09"x) 2)"09"x) end end .output~charout("0a"x) .output~charout("0a"x) end end say say end end
  49. Code to Code Hack #!/usr/bin/hhvm #!/usr/bin/hhvm //// ./mt9x9.hack ./mt9x9.hack ||||

    hhvm hhvm mt9x9.hack mt9x9.hack <<__EntryPoint>> <<__EntryPoint>> function function main(): main(): void void {{ for for ($i ($i == 1;1; $i$i <= <= 9;9; $i$i += += 3) 3) {{ for for ($j ($j == 1;1; $j$j <= <= 9;9; $j++) $j++) {{ foreach foreach (vec[$i, (vec[$i, $i+1, $i+1, $i+2] $i+2] as as $k) $k) {{ printf("%dx%d=%2d\t", printf("%dx%d=%2d\t", $k, $k, $j, $j, $k*$j); $k*$j); }} print("\n"); print("\n"); }} echo echo "\n"; "\n"; }} }} PHP #!/usr/bin/php #!/usr/bin/php <?php <?php //// ./mt9x9.php ./mt9x9.php |||| php php mt9x9.php mt9x9.php for for ($i ($i == 1;1; $i$i <= <= 9;9; $i$i += += 3) 3) {{ for for ($j ($j == 1;1; $j$j <= <= 9;9; $j++) $j++) {{ foreach foreach (array($i, (array($i, $i+1, $i+1, $i+2) $i+2) as as $k) $k) {{ printf("%dx%d=%2d\t", printf("%dx%d=%2d\t", $k, $k, $j, $j, $k*$j); $k*$j); }} print("\n"); print("\n"); }} echo echo "\n"; "\n"; }} ?> ?>
  50. Code to Code BASH Fish #!/usr/bin/bash #!/usr/bin/bash ## ./mt9x9.sh ./mt9x9.sh

    |||| bash bash mt9x9.sh mt9x9.sh #!/usr/bin/fish #!/usr/bin/fish ## ./mt9x9.fish ./mt9x9.fish |||| fish fish mt9x9.fish mt9x9.fish for for ii inin {1..9..3}; {1..9..3}; do do for for (((( jj == 1;1; jj <= <= 9;9; j++ j++ )); )); do do for k in $i $((i+1)) $((i+2)); for k in $i $((i+1)) $((i+2)); do do printf '%dx%d=%2d\t' $k printf '%dx%d=%2d\t' $k $j$j $((k*j)) $((k*j)) done done printf printf '\n' '\n' done done echo echo done done for for ii inin (seq (seq 11 33 9) 9) for for jj inin (seq (seq 9) 9) for k in $i (math for k in $i (math $i$i ++ 1) 1) (math (math $i$i ++ 2) 2) printf %dx%d=%2d\t $k $j (math printf %dx%d=%2d\t $k $j (math "$k "$k ** $j") $j") end end printf printf \n\n end end echo echo end end
  51. Code to Code Elvish YSH #!/usr/bin/elvish #!/usr/bin/elvish ## ./mt9x9.elv ./mt9x9.elv

    |||| elvish elvish mt9x9.elv mt9x9.elv #!/usr/bin/ysh #!/usr/bin/ysh ## ./mt9x9.ysh ./mt9x9.ysh |||| ysh ysh mt9x9.ysh mt9x9.ysh for for ii [(range [(range 11 10 10 &step=3)] &step=3)] {{ for for jj [(range [(range 11 10)] 10)] {{ for for kk [$i [$i (+ (+ $i$i 1) 1) (+ (+ $i$i 2)] 2)] {{ printf printf '%dx%d=%2d\t' '%dx%d=%2d\t' $k $k $j$j (*(* $k $k $j) $j) }} print print "\n" "\n" }} echo echo }} for for ii inin (1, (1, 4,4, 7) 7) {{ for for jj inin {1..9} {1..9} {{ for for kk inin $i$i $[i+1] $[i+1] $[i+2] $[i+2] {{ printf printf '%dx%d=%2d\t' '%dx%d=%2d\t' $k $k $j$j $[k*j] $[k*j] }} write write }} echo echo }}
  52. Code to Code ABS NGS #!/usr/bin/abs #!/usr/bin/abs //// ./mt9x9.abs ./mt9x9.abs

    |||| abs abs mt9x9.abs mt9x9.abs #!/usr/bin/ngs #!/usr/bin/ngs ## ./mt9x9.ngs ./mt9x9.ngs |||| ngs ngs mt9x9.ngs mt9x9.ngs for for ii inin [1, [1, 4,4, 7]7] {{ for for jj inin 1..9 1..9 {{ ss == """" for for kk inin [i,[i, i+1, i+1, i+2] i+2] {{ ss == ss ++ fmt("%sx%s=%2s\t", fmt("%sx%s=%2s\t", k,k, j,j, k*j) k*j) }} echo(s) echo(s) }} echo() echo() }} for(i; for(i; 3) 3) {{ for(j for(j == 1;1; jj <= <= 9;9; jj += += 1) 1) {{ [i*3+1, [i*3+1, i*3+2, i*3+2, i*3+3].each(F(k) i*3+3].each(F(k) {{ write("${k}x${j}=${if write("${k}x${j}=${if k*j<10 k*j<10 ' ' ' ' ''}${k*j}\t") ''}${k*j}\t") })}) write('\n') write('\n') }} echo('') echo('') }}
  53. Code to Code Nu #!/usr/bin/nu #!/usr/bin/nu ## ./mt9x9.nu ./mt9x9.nu ||||

    nu nu mt9x9.nu mt9x9.nu for for ii inin 1..4..<9 1..4..<9 {{ for for jj inin 1..9 1..9 {{ [$i [$i ($i ($i ++ 1) 1) ($i ($i ++ 2)] 2)] || each each {{ |k| |k| print -n $k x $j = (if ($k * $j) print -n $k x $j = (if ($k * $j) << 10 10 {"{" "}) "}) ($k ($k ** $j) $j) "\t" "\t" }} char char newline newline || print print -n -n }} print print """" }} CSH #!/usr/bin/tcsh #!/usr/bin/tcsh ## ./mt9x9.csh ./mt9x9.csh |||| tcsh tcsh mt9x9.csh mt9x9.csh foreach foreach ii (1 (1 44 7) 7) set j = 1 set j = 1 while while ($j ($j <= <= 9) 9) foreach K foreach K (0 (0 11 2) 2) @ @ kk == $i$i ++ $K $K echo echo -n -n "$k"x"$j"= "$k"x"$j"= @ s = $k @ s = $k ** $j$j ifif ($s ($s << 10) 10) echo echo -n -n "" "" echo echo -n -n "$s\t" "$s\t" end end echo echo -n -n "\n" "\n" @ j++ @ j++ end end echo echo end end
  54. Code to Code Oh Murex #!/usr/bin/oh #!/usr/bin/oh ## ./mt9x9.oh ./mt9x9.oh

    |||| oh oh mt9x9.oh mt9x9.oh #!/usr/bin/murex #!/usr/bin/murex ## ./mt9x9.mx ./mt9x9.mx |||| murex murex mt9x9.mx mt9x9.mx for for (seq (seq 3) 3) (method (method (I) (I) {{ define define ii (math (math "$I "$I ** 33 ++ 1") 1") for (seq 9) (method (J) { for (seq 9) (method (J) { define define jj (math (math "$J "$J ++ 1") 1") for for (seq (seq 3) 3) (method (method (K) (K) {{ define define kk (math (math "$K "$K ++ $i") $i") printf %dx%d=%2d\t $k printf %dx%d=%2d\t $k $j$j (math (math "$k "$k ** $j") $j") })}) printf printf \n\n })}) echo echo })}) for: for: (i(i == 1;1; ii <= <= 9;9; ii == ii ++ 3) 3) {{ a:a: [1..9] [1..9] -> -> foreach: foreach: jj {{ a:a: [$i, [$i, ${= ${= i+1}, i+1}, ${= ${= i+2}] i+2}] -> -> foreach: foreach: kk {{ (${= (${= k}x${= k}x${= j}=) j}=) if:if: {= {= $k*$j $k*$j << 10} 10} {({( )})} (${= (${= $k*$j})\t $k*$j})\t }} ()\n ()\n }} out: out: }}
  55. Code to Code Shell++ Dune #!/usr/bin/shpp #!/usr/bin/shpp ## ./mt9x9.shpp ./mt9x9.shpp

    |||| shpp shpp mt9x9.shpp mt9x9.shpp #!/usr/bin/dunesh #!/usr/bin/dunesh ## ./mt9x9.dune ./mt9x9.dune |||| dunesh dunesh mt9x9.dune mt9x9.dune for for ii inin range(1, range(1, 10, 10, 3) 3) {{ for for jj inin range(1, range(1, 10) 10) {{ for for kk inin [i,[i, i+1, i+1, i+2] i+2] {{ print("{k}x{j}=", print("{k}x{j}=", "" {k*j}"[-2:], {k*j}"[-2:], end="\t") end="\t") }} print(end="\n") print(end="\n") }} print() print() }} for for ii inin [1, [1, 4,4, 7]7] {{ for for jj inin 11 toto 10 10 {{ for for kk inin ii toto ii ++ 33 {{ print print (str (str k)+"x"+(str k)+"x"+(str j)+"="; j)+"="; ifif kk ** jj << 10 10 (print (print "" "); "); print (str k * j)+"\t" print (str k * j)+"\t" };}; println println """" };}; echo echo """" }}
  56. Code to Code PowerShell Batch #!/usr/bin/pwsh #!/usr/bin/pwsh ##./mt9x9.ps1 ./mt9x9.ps1||||pwsh pwshmt9x9.ps1

    mt9x9.ps1 @echo @echo off off rem wine rem wine cmd cmd /c/c mt9x9.bat mt9x9.bat For For($i ($i==1;1;$i$i-le -le9;9;$i$i+= +=3) 3){{ ForEach ForEach($j ($jinin1..9) 1..9){{ ForEach ForEach($k ($kinin$i, $i,($i+1), ($i+1),($i+2)) ($i+2)){{ Write-Host -NoNewline Write-Host -NoNewline("{0}x{1}={2,2}`t" ("{0}x{1}={2,2}`t"-f-f$k, $k,$j, $j,($k*$j)) ($k*$j)) }} Write-Host Write-Host }} """" }} setlocal setlocal enabledelayedexpansion enabledelayedexpansion for /l %%i for /l %%i inin (1,3,9) (1,3,9) do do (( for for /l/l %%j %%j inin (1,1,9) (1,1,9) do do (( for /l %%K in (0,1,2) for /l %%K in (0,1,2) do do (( set set /a/a k=%%i+%%K k=%%i+%%K set /a s=!k!*%%j set /a s=!k!*%%j <nul <nul set/p"=!k!x%%j=" set/p"=!k!x%%j=" ifif !s! lss !s! lss 10 10 (<nul (<nul set/p"= set/p"= ")") <nul <nul set/p"=!s! set/p"=!s!⇥ ⇥"" )) echo. echo. )) echo. echo. )) endlocal endlocal
  57. Code to Code Rc #!/usr/bin/es #!/usr/bin/es ##./mt9x9.es ./mt9x9.es||||es esmt9x9.es mt9x9.es

    II==.. for for(i(i==11223) 3){{ IIII==$I$I for for(j(j==11223344556677889) 9){{ II==$II $II for for(K (K==11223) 3){{ kk==$#I $#I SS SS==()() for for(S (S==11223344556677889) 9){{ SS = $SS $I SS = $SS $I ifif{~ {~$S $S$j} $j}{break} {break} }} ss==$#SS $#SS echo echo-n -n$k'x'$j'=' $k'x'$j'=' ifif{~ $SS(10) {~ $SS(10)()} ()}{echo {echo-n -n' ''}'} echo -n $s\t echo -n $s\t II==$I$I.. }} echo echo-n -n\n\n }} echo echo }} EFI Shell ##mt9x9.nsh mt9x9.nsh @echo @echo-off -off for for%i %irun run(1(1993)3) for for%j %jrun run(1(19)9) set s set s"""" set setaa00 for for%t %trun run(%i (%i10 102)2) ififnot %t == %i not %t == %ithen then ifif%a% %a%== ==00then then set setaa%t %t endif endif endif endif endfor endfor for for%k %krun run(%i (%i%a%) %a%) set b 0 set b 0 for for%p %prun run(1(1%k) %k) set q set q%b% %b% for for%t %trun run(%q% (%q%100 100%j) %j) ififnot not%t %t== ==%b% %b%then then ifif%b% %b%== ==%q% %q%then then set b %t set b %t endif endif endif endif endfor endfor endfor endfor set setss"%s%%kx%j=" "%s%%kx%j=" for %t for %trun run(%b% (%b%00-10) -10) set c %t set c %t endfor endfor ifif%c% %c%== ==%b% %b%then then set s "%s% set s "%s%"" endif endif set setss"%s%%b% "%s%%b% "" endfor endfor echo echo"%s%" "%s%" endfor endfor echo echo"""" endfor endfor
  58. Code to Code AWK #!/usr/bin/awk #!/usr/bin/awk -f-f ## ./mt9x9.awk ./mt9x9.awk

    |||| awk awk -f-f mt9x9.awk mt9x9.awk BEGIN BEGIN {{ for(i for(i == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(j for(j == 1;1; jj <= <= 9;9; j++) j++) {{ for(k for(k == i;i; kk <= <= i+2; i+2; k++) k++) printf("%dx%d=%2d\t", printf("%dx%d=%2d\t", k,k, j,j, k*j) k*j) printf "\n" printf "\n" }} print print }} }} Miller ## mlr mlr -n -n put put -f-f mt9x9.mlr mt9x9.mlr begin begin {{ for for (int (int ii == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for for (int (int jj == 1;1; jj <= <= 9;9; jj += += 1) 1) {{ for for (int (int kk == i;i; kk <= <= i+2; i+2; kk += += 1) 1) {{ printn printn fmtnum(k, fmtnum(k, "%dx").fmtnum(j, "%dx").fmtnum(j, "%d=") "%d=") printn printn fmtnum(k*j, fmtnum(k*j, "%2d\t"); "%2d\t"); }} printn printn "\n"; "\n"; }} print; print; }} }}
  59. Code to Code Squirrel #!/usr/bin/sq #!/usr/bin/sq //// ./mt9x9.nut ./mt9x9.nut ||||

    sq sq mt9x9.nut mt9x9.nut for(local for(local ii == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(local for(local jj == 1;1; jj <= <= 9;9; j++) j++) {{ foreach(k foreach(k inin [i,[i, i+1, i+1, i+2]) i+2]) {{ printf("%dx%d=%2d\t", printf("%dx%d=%2d\t", k,k, j,j, k*j); k*j); }} print("\n"); print("\n"); }} print("\n"); print("\n"); }} Poke #!/usr/bin/poke #!/usr/bin/poke -L -L !#!# //// ./mt9x9.pk ./mt9x9.pk |||| poke poke -L -L mt9x9.pk mt9x9.pk for for (var (var ii == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for for (var (var jj == 1;1; jj <= <= 9;9; j++) j++) {{ for for (k(k inin [i,[i, i+1, i+1, i+2]) i+2]) {{ printf printf "%u8dx%u8d=", "%u8dx%u8d=", k,k, j;j; ifif (k*j (k*j << 10) 10) print print "" ";"; printf printf "%u8d\t", "%u8d\t", k*j; k*j; }} print print "\n"; "\n"; }} print print "\n"; "\n"; }}
  60. Code to Code SystemTap Nickle #!/usr/bin/stap #!/usr/bin/stap //// ./mt9x9.stp ./mt9x9.stp

    |||| stap stap mt9x9.stp mt9x9.stp #!/usr/bin/nickle #!/usr/bin/nickle ## nickle nickle mt9x9.5c mt9x9.5c probe probe oneshot oneshot {{ for(i for(i == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(j for(j == 1;1; jj <= <= 9;9; j++) j++) {{ for(k for(k == i;i; kk <= <= i+2; i+2; k++) k++) printf("%dx%d=%2d\t", printf("%dx%d=%2d\t", k,k, j,j, k*j) k*j) print("\n") print("\n") }} println() println() }} }} int int i,i, j,j, k;k; for(i for(i == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(j for(j == 1;1; jj <= <= 9;9; j++) j++) {{ for(k for(k == i;i; kk <= <= i+2; i+2; k++) k++) printf("%dx%d=%2d\t", printf("%dx%d=%2d\t", k,k, j,j, k*j); k*j); putchar(10); putchar(10); }} printf("\n"); printf("\n"); }} exit(0); exit(0);
  61. Code to Code Slogan Chuck //// slogan slogan -e -e

    mt9x9.sn mt9x9.sn //// chuck chuck --silent --silent mt9x9.ck mt9x9.ck for for (i(i == 1;1; ii <= <= 9;9; i+3) i+3) {{ for for (j(j == 1;1; jj <= <= 9;9; j+1) j+1) {{ for for (k(k == i;i; kk <= <= i+2; i+2; k+1) k+1) show(k, "x", j, "=", show(k, "x", j, "=", ifif (k*j (k*j << 10) 10) "" "" else else "", "", k*j, k*j, "\t") "\t") newline() newline() }} showln() showln() }} for for (1 (1 => => int int i;i; ii <= <= 9;9; 33 +=> +=> i)i) {{ for for (1 (1 => => int int j;j; jj <= <= 9;9; j++) j++) {{ for for (i(i => => int int k;k; kk <= <= i+2; i+2; k++) k++) {{ chout chout <= <= kk <= <= "x" "x" <= <= jj <= <= "="; "="; ifif (k*j < 10) chout <= " "; (k*j < 10) chout <= " "; chout chout <= <= k*j k*j <= <= "\t"; "\t"; }} chout chout <= <= "\n"; "\n"; }} chout chout <= <= IO.nl(); IO.nl(); }}
  62. Code to Code Ferite Luban //// luban luban mt9x9.lbn mt9x9.lbn

    console console == std::console(); std::console(); for(i for(i == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for(j for(j == 1;1; jj <= <= 9;9; j++) j++) {{ foreach(k foreach(k inin [i,[i, i+1, i+1, i+2]) i+2]) {{ console.write(string(k)+'x'+string(j)+'='); console.write(string(k)+'x'+string(j)+'='); console.write(k*j console.write(k*j << 10 10 ?? "" "" :: ""); ""); console.write(string(k*j)+'\t'); console.write(string(k*j)+'\t'); }} console.write('\n'); console.write('\n'); }} console.writeline(); console.writeline(); }} #!/usr/bin/ferite #!/usr/bin/ferite //// ferite ferite mt9x9.fe mt9x9.fe uses uses "console"; "console"; for (number for (number ii == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for for (number (number jj == 1;1; jj <= <= 9;9; j++) j++) {{ number k = i; number k = i; while while (k(k <= <= i+2) i+2) {{ Console.print("${k}x${j}="); Console.print("${k}x${j}="); ifif (k*j (k*j << 10) 10) Console.print(" Console.print(" "); "); Console.print("${k*j}\t"); Console.print("${k*j}\t"); k++; k++; }} Console.print("\n"); Console.print("\n"); }} Console.println(""); Console.println(""); }}
  63. Code to Code Picat ZKL % % picat picat mt9x9.pi

    mt9x9.pi //// ./mt9x9.zkl ./mt9x9.zkl |||| zkl zkl mt9x9.zkl mt9x9.zkl main main => => foreach(I foreach(I inin 1..9, 1..9, II mod mod 33 == == 1) 1) foreach(J foreach(J inin 1..9) 1..9) foreach(K in foreach(K in [I,[I, I+1, I+1, I+2]) I+2]) writef("%dx%d=%2d\t", writef("%dx%d=%2d\t", K, K, J,J, K*J) K*J) end, end, writef("\n") writef("\n") end, end, print("\n") print("\n") end. end. foreach foreach ii inin ([1..9, ([1..9, 3]) 3]) {{ foreach foreach jj inin (Utils.range(1, (Utils.range(1, 9)) 9)) {{ foreach foreach kk inin (L(i, (L(i, i+1, i+1, i+2)) i+2)) {{ print(k, print(k, "x", "x", j,j, "=", "=", "%2d".fmt(k*j), "%2d".fmt(k*j), "\t"); "\t"); }} print("\n"); print("\n"); }} println(); println(); }}
  64. Code to Code Haxe //// haxe haxe --main --main Mt9x9

    Mt9x9 --interp --interp class class Mt9x9 Mt9x9 {{ static static function function main() main() {{ for for (i(i inin [1, [1, 4,4, 7]) 7]) {{ for for (j(j inin 1...10) 1...10) {{ for for (k(k inin [i,[i, i+1, i+1, i+2]) i+2]) {{ Sys.print(k+'x'+j+'='+(k*j<10?' Sys.print(k+'x'+j+'='+(k*j<10?' ':'')+k*j+'\t'); ':'')+k*j+'\t'); }} Sys.print('\n'); Sys.print('\n'); }} Sys.println(''); Sys.println(''); }} }} }} Pony ////ponyc ponyc-b -bmt9x9 mt9x9&& &&./mt9x9 ./mt9x9 use use"collections" "collections" use "format" use "format" actor actorMain Main new newcreate(env: create(env:Env) Env)=> => for foriiininRange[U8](1, Range[U8](1,10, 10,3) 3)do do for j in Range[U8](1, 10) do for j in Range[U8](1, 10) do for forkkinin[i;[i;i+1; i+1;i+2].values() i+2].values()do do env.out.write(k.string() env.out.write(k.string()++"x" "x"++j.string() j.string()++"=" "="++ Format.int[U8](k*j Format.int[U8](k*jwhere wherewidth=2) width=2)++"\t") "\t") end end env.out.write("\n") env.out.write("\n") end end env.out.print("") env.out.print("") end end
  65. Code to Code Colm Neko ## colm colm mt9x9.lm mt9x9.lm

    && && ./mt9x9 ./mt9x9 //// nekoc nekoc mt9x9.neko mt9x9.neko && && neko neko mt9x9.n mt9x9.n i:i: int int == 11 while while (i(i <= <= 9) 9) {{ j:j: int int == 11 while while (j(j <= <= 9) 9) {{ k:k: int int == ii while while (k(k <= <= i+2) i+2) {{ print(k, print(k, 'x', 'x', j,j, '=') '=') ifif (k*j (k*j << 10) 10) print(' print(' ')') print(k*j, print(k*j, '\t') '\t') kk == kk ++ 11 }} print('\n') print('\n') jj == jj ++ 11 }} print('\n') print('\n') ii == ii ++ 33 }} var var sprintf sprintf == $loader.loadprim("std@sprintf", $loader.loadprim("std@sprintf", 2); 2); var i = 1; var i = 1; while while ii <= <= 99 {{ var var jj == 1;1; while while jj <= <= 99 {{ var k = var k = i;i; while while kk <= <= i+2 i+2 {{ $print(k, $print(k, "x", "x", j,j, "=", "=", sprintf("%2d", sprintf("%2d", k*j), k*j), "\t"); "\t"); kk += += 1;1; }} $print("\n"); $print("\n"); jj += += 1;1; }} $print("\n"); $print("\n"); ii += += 3;3; }}
  66. Code to Code Nit #!/usr/bin/nit #!/usr/bin/nit ## nitc nitc mt9x9.nit

    mt9x9.nit && && ./mt9x9 ./mt9x9 |||| ./mt9x9.nit ./mt9x9.nit |||| nit nit mt9x9.nit mt9x9.nit for for ii inin [1..10[.step(3) [1..10[.step(3) do do for j in [1..9] do for j in [1..9] do for for kk inin [i,[i, i+1, i+1, i+2] i+2] do do printn "{k}x{j}=" printn "{k}x{j}=" ifif k*j k*j << 10 10 then then printn " " printn " " end end printn printn "{k*j}\t" "{k*j}\t" end end printn printn "\n" "\n" end end print print """" end end Oz % % ozc ozc -c-c mt9x9.oz mt9x9.oz && && ozengine ozengine mt9x9.ozf mt9x9.ozf functor functor import import System System define define for for II inin 1..9;3 1..9;3 do do for J in 1..9 for J in 1..9 do do for K in [I I+1 for K in [I I+1 I+2] I+2] do do {System.printInfo {System.printInfo K#"x"#J#"="} K#"x"#J#"="} ifif K*J < 10 then {System.printInfo K*J < 10 then {System.printInfo "" "}"} end end {System.printInfo K*J#"\t"} {System.printInfo K*J#"\t"} end end {System.printInfo {System.printInfo "\n"} "\n"} end end {System.showInfo {System.showInfo ""} ""} end end end end
  67. Code to Code Scheme CommonLisp #!/usr/bin/guile #!/usr/bin/guile-s-s !#!# ;;./mt9x9.scm ./mt9x9.scm||||guile

    guilemt9x9.scm mt9x9.scm #!/usr/bin/gcl #!/usr/bin/gcl -f-f ;; ./mt9x9.lisp ./mt9x9.lisp |||| gcl gcl -f-f mt9x9.lisp mt9x9.lisp (use-modules (use-modules(ice-9 (ice-9format)) format)) (for-each (for-each (lambda (lambda(i) (i) (for-each (for-each (lambda (lambda(j) (j) (for-each (for-each (lambda (lambda(k) (k) (format (format#t#t"~dx~d=~2d~c" "~dx~d=~2d~c"kkjj(*(*kkj)j)#\tab)) #\tab)) (list i (+ i 1) (+ i 2))) (list i (+ i 1) (+ i 2))) (display (display#\newline)) #\newline)) (map 1+ (iota (map 1+ (iota9))) 9))) (newline)) (newline)) '(1 '(1447)) 7)) (dolist (dolist (i(i '(1 '(1 44 7)) 7)) (dolist (dolist (j(j '(1 '(1 22 33 44 55 66 77 88 9)) 9)) (dolist (k (list i (+ i 1) (+ (dolist (k (list i (+ i 1) (+ ii 2))) 2))) (format t "~Dx~D=~2D (format t "~Dx~D=~2D ~@T" ~@T" kk jj (*(* kk j)) j)) )) (format (format tt "~%") "~%") )) (terpri) (terpri) ))
  68. Code to Code Janet Clojure #!/usr/bin/janet #!/usr/bin/janet ## ./mt9x9.janet ./mt9x9.janet

    |||| janet janet mt9x9.janet mt9x9.janet #!/usr/bin/clojure #!/usr/bin/clojure ;;;; ./mt9x9.clj ./mt9x9.clj |||| clojure clojure mt9x9.clj mt9x9.clj (loop (loop [i[i :range :range [1[1 9]9] :when :when (zero? (zero? (% (% (-(- ii 1) 1) 3))] 3))] (for (for jj 11 10 10 (each (each kk [i[i (+ (+ ii 1) 1) (+ (+ ii 2)] 2)] (prin k "x" j "=" (string/format (prin k "x" j "=" (string/format "%2d" "%2d" (*(* kk j)) j)) "\t") "\t") )) (print) (print) )) (print) (print) )) (doseq (doseq [i[i (range (range 11 10 10 3) 3) jj (range (range 11 10) 10) kk [i[i (+ (+ ii 1) 1) (+ (+ ii 2)]] 2)]] (printf (printf "%dx%d=%2d" "%dx%d=%2d" kk jj (*(* kk j)) j)) (print (if (not= k (+ i 2)) "\t" (if (= (print (if (not= k (+ i 2)) "\t" (if (= jj 9) 9) "\n\n" "\n\n" "\n"))) "\n"))) ))
  69. Code to Code SCSH TXR Lisp #!/usr/bin/scsh #!/usr/bin/scsh -s-s !#!#

    ;; ./mt9x9.scsh ./mt9x9.scsh |||| scsh scsh -s-s mt9x9.scsh mt9x9.scsh #!/usr/bin/txr #!/usr/bin/txr -f-f ;;;; ./mt9x9.tl ./mt9x9.tl |||| ./txr ./txr -f-f mt9x9.tl mt9x9.tl (for-each (for-each (lambda (lambda (i) (i) (for-each (for-each (lambda (lambda (j) (j) (for-each (for-each (lambda (lambda (k) (k) (format (format #t#t "~Dx~D=" "~Dx~D=" kk j)j) (if(if (< (< (*(* kk j)j) 10) 10) (format (format #t#t "" ")) ")) (format #t "~D~A" (* k j) #\tab)) (format #t "~D~A" (* k j) #\tab)) (list (list ii (+ (+ ii 1) 1) (+ (+ ii 2))) 2))) (display #\newline)) (display #\newline)) (map (map (lambda (lambda (x) (x) (+ (+ 11 x)) x)) (iota (iota 9))) 9))) (newline)) (newline)) '(1 '(1 44 7)) 7)) (each (each ((i ((i (range (range 11 99 3))) 3))) (each (each ((j ((j (range (range 11 9))) 9))) (each ((k (list i (+ (each ((k (list i (+ ii 1) 1) (+ (+ ii 2)))) 2)))) (format (format tt "~ax~a=~2a\t" "~ax~a=~2a\t" kk jj (*(* kk j)) j)) )) (put-string (put-string "\n") "\n") )) (put-line) (put-line) ))
  70. Code to Code Dern newLISP #!/usr/bin/dern #!/usr/bin/dern !#!# ;; ./mt9x9.dern

    ./mt9x9.dern |||| dern dern mt9x9.dern mt9x9.dern #!/usr/bin/newlisp #!/usr/bin/newlisp ;; ./mt9x9.lsp ./mt9x9.lsp |||| newlispmt9x9.lsp newlispmt9x9.lsp (print-readably (print-readably false) false) (for i from {D+1} (for i from {D+1} toto {D+9} {D+9} step step {D+3} {D+3} (for j from {D+1} to {D+9} (for j from {D+1} to {D+9} (for (for kk from from ii toto (+ (+ ii {D+2}) {D+2}) (print k) (print k) (print (print [x]) [x]) (print j) (print j) (print (print [=]) [=]) (if(if (< (< (*(* kk j)j) {D+10}) {D+10}) (print (print [[ ])) ])) (print (* k j)) (print (* k j)) (print (print [|tab|]) [|tab|]) )) (print (print [|newline|]) [|newline|]) )) (print (print [|0A|]) [|0A|]) )) (for (for (i(i 11 99 3) 3) (for (for (j(j 11 9) 9) (for (k (for (k ii (+ (+ ii 2)) 2)) (print (format (print (format "%dx%d=%2d\t" "%dx%d=%2d\t" kk jj (*(* kk j))) j))) )) (print (print "\n") "\n") )) (println) (println) )) (exit) (exit)
  71. Code to Code Racket ESlang #!/usr/bin/racket #!/usr/bin/racket ;; ./mt9x9.rkt ./mt9x9.rkt

    |||| racket racket mt9x9.rkt mt9x9.rkt #!/usr/bin/es #!/usr/bin/es ;;;; ./mt9x9.esl ./mt9x9.esl |||| es es mt9x9.esl mt9x9.esl #lang #lang racket racket (for (for ([i([i (in-range (in-range 11 10 10 3)]) 3)]) (for ([j (in-range 1 10)]) (for ([j (in-range 1 10)]) (for (for ([k ([k (list (list ii (+ (+ ii 1) 1) (+ (+ ii 2))]) 2))]) (printf (printf "~ax~a=" "~ax~a=" kk j)j) (display (display (~a (~a (*(* kk j)j) #:width #:width 22 #:align #:align 'right)) 'right)) (printf "\t") (printf "\t") )) (displayln (displayln "") "") )) (newline) (newline) )) (for (for ii inin (1 (1 10 10 3) 3) (for (for jj inin (1 (1 10) 10) (for k in (@ (for k in (@ ii (i(i ++ 1) 1) (+ (+ ii 2)) 2)) (printf '$(k)x$(j)=') (printf '$(k)x$(j)=') (if(if ((k ((k ** j)j) << 10) 10) (printf (printf "" ")) ")) (printf '$(k * j)\t') (printf '$(k * j)\t') )) (printf (printf "\n") "\n") )) (print) (print) ))
  72. Code to Code Arc CLIPS ;; arcadia arcadia mt9x9.arc mt9x9.arc

    #!/usr/bin/clips #!/usr/bin/clips -f2 -f2 ;; ./mt9x9.clp || clips ./mt9x9.clp || clips -f2 -f2 mt9x9.clp mt9x9.clp (let (let ii 11 (while (while (< (< ii 9) 9) (for (for jj 11 99 (each (each kk (list (list ii (+ (+ ii 1) 1) (+ (+ ii 2)) 2)) (pr k "x" j "=" (if (< (* k (pr k "x" j "=" (if (< (* k j)j) 10) 10) "" "" "") "") (*(* kk j)j) "\t") "\t") )) (pr (pr "\n") "\n") )) (prn) (prn) (++ (++ ii 3) 3) )) )) (foreach (foreach ?i?i (create$ (create$ 11 44 7) 7) (loop-for-count (?j 1 9) (loop-for-count (?j 1 9) (bind (bind ?k ?k ?i) ?i) (while (<= (while (<= ?k ?k (+ (+ ?i?i 2)) 2)) (printout (printout tt ?k ?k "x" "x" ?j?j "=") "=") (if(if (< (< (*(* ?k ?k ?j) ?j) 10) 10) then then (printout (printout tt "" ")") )) (printout (printout tt (*(* ?k ?k ?j) ?j) tab) tab) (bind ?k (+ ?k 1)) (bind ?k (+ ?k 1)) )) (printout (printout tt crlf) crlf) )) (printout (printout tt crlf) crlf) )) (exit) (exit)
  73. Code to Code Fennel #!/usr/bin/fennel #!/usr/bin/fennel ;; ./mt9x9.fnl ./mt9x9.fnl ||||

    fennel fennel mt9x9.fnl mt9x9.fnl (for (for [i[i 11 99 3]3] (for (for [j[j 11 9]9] (each (each [_[_ kk (ipairs (ipairs [i[i (+ (+ ii 1) 1) (+ (+ ii 2)])] 2)])] (io.write k "x" j "=") (io.write k "x" j "=") (if(if (< (< (*(* kk j)j) 10) 10) (io.write (io.write "" ")) ")) (io.write (* k j) "\t") (io.write (* k j) "\t") )) (io.write (io.write "\n") "\n") )) (print) (print) )) Shen \\\\shen-scheme shen-schemescript scriptmt9x9.shen mt9x9.shen (define (defineitem item JJKK-> ->(output (output"~Ax~A=~A~Ac#9;" "~Ax~A=~A~Ac#9;"KKJJ(if(if(< (<(*(*KKJ)J)10) 10)"""""") "")(*(*KKJ)) J)) )) (define (defineline line IIJJ-> ->(do (do(map (map(item (itemJ)J)[I[I(+ (+II1)1)(+ (+II2)]) 2)]) (output "~%")) (output "~%")) )) (define (defineblock block II-> ->(do (do(map (map(line (lineI)I)[1[1223344556677889]) 9]) (nl)) (nl)) )) (map (map(fn (fnblock) block)[1[1447]) 7])
  74. Code to Code Ruby #!/usr/bin/ruby #!/usr/bin/ruby ## ./mt9x9.rb ./mt9x9.rb ||||

    ruby ruby mt9x9.rb mt9x9.rb for for ii inin (1..9).step(3) (1..9).step(3) for for jj inin (1..9) (1..9) [i,[i, i+1, i+1, i+2].each{|k| i+2].each{|k| print print "%dx%d=%2d\t" "%dx%d=%2d\t" % % [k, [k, j,j, k*j] k*j] }} print print "\n" "\n" end end puts puts end end Crystal #!/usr/bin/crystal #!/usr/bin/crystal ## crystal crystal build build mt9x9.cr mt9x9.cr && && ./mt9x9 ./mt9x9 |||| ./mt9x9.cr ./mt9x9.cr ## |||| crystal mt9x9.cr crystal mt9x9.cr 1.step(to: 1.step(to: 9,9, by: by: 3) 3) do do |i||i| 1.upto(9) 1.upto(9) do do |j||j| [i,[i, i+1, i+1, i+2].each i+2].each do do |k| |k| print print "#{k}x#{j}=#{k*j<10 "#{k}x#{j}=#{k*j<10 ?? "" "" :: ""}#{k*j}\t" ""}#{k*j}\t" end end puts puts end end puts puts end end
  75. Code to Code Gri Perfume #!/usr/bin/gri #!/usr/bin/gri ## ./mt9x9.gri ./mt9x9.gri

    |||| gri gri mt9x9.gri mt9x9.gri #!/usr/bin/numbat #!/usr/bin/numbat ## ./mt9x9.nbt ./mt9x9.nbt |||| numbat numbat mt9x9.nbt mt9x9.nbt .i..i. == 11 while while {rpn {rpn .i..i. 99 >=} >=} .j..j. == 11 while while {rpn {rpn .j..j. 99 >=} >=} .k. = .i. .k. = .i. while while {rpn {rpn .k. .k. .i..i. 22 ++ >=} >=} show .k. "x" .j. "=" show .k. "x" .j. "=" ...... ifif {rpn {rpn 10 10 .k. .k. .j..j. ** <} <} show " " ... show " " ... end end ifif show show {rpn {rpn .k. .k. .j..j. *}*} "\>>" "\>>" ...... .k. .k. += += 11 end while end while show show "\<<" "\<<" ...... .j..j. += 1 += 1 end while end while show show """" .i..i. += += 33 end while end while fnfn item(j: item(j: Scalar, Scalar, k:k: Scalar) Scalar) -> -> String String == "{k}x{j}={k*j:2}\t" "{k}x{j}={k*j:2}\t" fnfn line(i: line(i: Scalar, Scalar, j:j: Scalar, Scalar, k:k: Scalar) Scalar) -> -> String String == ifif kk <= <= i+2 i+2 then then "{item(j, "{item(j, k)}{line(i, k)}{line(i, j,j, k+1)}" k+1)}" else else "\n" "\n" fnfn block(i: Scalar, block(i: Scalar, j:j: Scalar) Scalar) -> -> String String == ifif jj <= <= 99 then then "{line(i, "{line(i, j,j, i)}{block(i, i)}{block(i, j+1)}" j+1)}" else if i < 7 then "\n" else "" else if i < 7 then "\n" else "" fnfn main(i: main(i: Scalar) Scalar) -> -> String String == ifif ii <= <= 99 then then "{block(i, "{block(i, 1)}{main(i+3)}" 1)}{main(i+3)}" else "" else "" print(main(1)) print(main(1))
  76. Code to Code. Min C3 //// c3c c3c compile compile

    mt9x9.c3 mt9x9.c3 && && ./mt9x9 ./mt9x9 import import std::io; std::io; fnfn void void main() main() {{ for for (int (int ii == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for for (int (int jj == 1;1; jj <= <= 9;9; j++) j++) {{ foreach foreach (k: (k: (int[3]){i, (int[3]){i, i+1, i+1, i+2}) i+2}) io::printf("%dx%d=%2d\t", io::printf("%dx%d=%2d\t", k,k, j,j, k*j); k*j); io::print("\n"); io::print("\n"); }} io::printn(); io::printn(); }} }} ;; min min mt9x9.min mt9x9.min 11 :i:i (i(i 99 <=) <=) (( 11 :j:j (j(j 99 <=) <=) (( (0 (0 11 2) 2) (( ii ++ :k:k kk print! print! "x" "x" print! print! jj print! print! "=" "=" print! print! kk jj ** :s:s (s(s 10 10 <) <) "" "" """" ifif print! print! ss print! 9 chr print! print! 9 chr print! )) foreach foreach 10 10 chr chr print! print! jj succ @j succ @j )) while while """" puts! puts! ii 33 ++ @i @i )) while while
  77. Code to Code Forth DC #!#! /usr/bin/gforth /usr/bin/gforth \\ ./mt9x9.fth

    ./mt9x9.fth |||| gforth gforth mt9x9.fth mt9x9.fth #!/usr/bin/dc #!/usr/bin/dc [[ ./mt9x9.dc ./mt9x9.dc |||| dc dc mt9x9.dc mt9x9.dc ]sz ]sz :: mt9x9 mt9x9 10 10 11 do do 10 10 11 do do 33 00 do do ii kk ++ 11 u.r u.r 120 120 emit emit jj 11 u.r 61 emit u.r 61 emit ii kk ++ jj ** 22 u.r u.r 99 emit emit loop loop 10 10 emit emit loop loop crcr 33 +loop +loop ;; mt9x9 mt9x9 bye bye [32 [32 P]sS P]sS [[ lklk nn [x] [x] PP ljlj nn [=] [=] PP lklk ljlj ** dd 99 !<S !<S nn 99 PP lklk 11 ++ dd sk sk lili 22 ++ !<K !<K ]sK ]sK [[ lili dd sk sk lK lK xx 10 10 PP ljlj 11 ++ dd sjsj 99 !<J !<J ]sJ ]sJ [[ 11 dd sjsj lJlJ xx 10 10 PP lili 33 ++ dd sisi 99 !<I !<I ]sI ]sI 11 dd sisi lIlI xx
  78. Code to Code Retro Joy ## ./mt9x9.joy ./mt9x9.joy |||| joy

    joy mt9x9.joy mt9x9.joy #!/usr/bin/retro #!/usr/bin/retro (( retro retro mt9x9.retro mt9x9.retro )) 11 [9[9 <=] <=] [[ 11 [9[9 <=] <=] [[ 00 [2[2 <=] <=] [[ dup dup rotated rotated dupd dupd ++ dup 48 + putch dup 48 + putch 'x'x putch putch rolldown rolldown dup dup 48 48 ++ putch putch '='= putch putch dup rollup * 'i 2 1 format putchars dup rollup * 'i 2 1 format putchars rolldown rolldown '\t'\t putch succ putch succ ]] while while pop pop '\n '\n putch putch succ succ ]] while pop while pop '\n '\n putch putch 33 ++ ]] while while pop. pop. ~~~ ~~~ {{ #1 #1 #4 #4 #7 #7 }} [[ {{ #1 #1 #2 #2 #3 #3 #4 #4 #5 #5 #6 #6 #7 #7 #8 #8 #9 #9 }} [[ dup-pair swap dup-pair swap {{ #0 #0 #1 #1 #2 #2 }} [[ ++ dup-pair dup-pair n:put n:put 'x'x s:put s:put n:put n:put '='= s:put s:put ** dup dup #10 #10 lt? lt? [[ '_'_ s:put s:put ]] ifif '%n\t s:format s:put '%n\t s:format s:put dup-pair dup-pair swap swap ]] a:for-each a:for-each nlnl drop-pair drop-pair drop drop ]] a:for-each a:for-each nlnl drop drop ]] a:for-each a:for-each ~~~ ~~~
  79. Code to Code Factor PostScript !!Factor Factormt9x9.factor mt9x9.factor % %

    gs gs -q -q -dNODISPLAY -dNODISPLAY -dBATCH -dBATCH mt9x9.ps mt9x9.ps USING: USING:byte-arrays byte-arraysioioio.encodings.ascii io.encodings.asciiio.encodings.string io.encodings.string kernel math prettyprint ranges sequences kernel math prettyprint ranges sequences;; 119933<range> <range>[[ 99[1..b] [1..b][[ over overdup dup 22++11<range> <range>[[ 2dup 2dup pprint pprint"x" "x"write write pprint "=" write pprint "=" write over over**dup dup10 10<<[[blblpprint pprint]][[pprint pprint]]ifif 991byte-array 1byte-arrayascii asciidecode decodewrite write ]]each each drop drop "\n" "\n"write write ]]each each drop drop nlnl ]]each each 11 33 99 {{ /i/i exch exch def def 11 11 99 {{ /j/j exch exch def def ii 11 ii 22 add add {{ /k/k exch exch def def kk 11 string string cvs cvs print print (x) (x) print print jj 11 string string cvs cvs print print (=) (=) print print kk jj mul mul dup dup 10 10 ltlt {{ (( )) print print }} ifif 22 string string cvs cvs print print (\t) (\t) print print }} for for (\n) (\n) print print }} for for ()() == }} for for
  80. Code to Code Thune Smalltalk #!/usr/bin/thune #!/usr/bin/thune ;; ./mt9x9.t ./mt9x9.t

    |||| thune thune mt9x9.t mt9x9.t #!/usr/bin/gst #!/usr/bin/gst "" ./mt9x9.st ./mt9x9.st |||| gst gst mt9x9.st mt9x9.st "" 11 :i:i [[ 11 :j:j [[ ii :k:k [[ kk prin prin 'x' 'x' prin prin jj prin prin '=' '=' prin prin 10 k j mul gt? ift (' ' prin) 10 k j mul gt? ift (' ' prin) kk jj mul mul prin prin '^-' '^-' prin prin kk inc inc :k:k ]] 33 loop loop '^/' prin '^/' prin jj inc inc :j:j ]] 99 loop loop '^/' prin '^/' prin 33 ii add add :i:i ]] 33 loop loop 11 to: to: 99 by: by: 33 do: do: [[ :i:i || 11 to: to: 99 do: do: [[ :j:j || ii to: to: i+2 i+2 do: do: [[ :k:k || Transcript Transcript show: show: kk printString, printString, 'x', 'x', jj printString, printString, '='. '='. k*j k*j << 10 10 ifTrue: ifTrue: [Transcript [Transcript show: show: ' ' '].']. Transcript Transcript show: show: (k*j) (k*j) printString. printString. Character tab display Character tab display ].]. Character Character nlnl display display ].]. Transcript Transcript crcr ].].
  81. Code to Code Self Stack #!/usr/bin/stk #!/usr/bin/stk ## ./mt9x9.stk ./mt9x9.stk

    |||| stk stk mt9x9.stk mt9x9.stk 11 99 33 range range (i) (i) (( 11 (j) (j) var var (( [[ ii ii 11 add add ii 22 add add ]] (k) (k) (( kk print print (x) (x) print print jj print print (=) (=) print print (((( )) print) print) (() (() print) print) kk jj mul mul 10 10 less less ifif kk jj mul mul print print (\t) (\t) print print )) for for (\n) (\n) print print jj 11 add add (j) (j) var var )) (j(j 10 less) while 10 less) while ii 33 add add (i) (i) var var ()() println println )) for for "" zigself zigself mt9x9.self mt9x9.self "" 'objects/everything.self' 'objects/everything.self' _RunScript. _RunScript. 00 to: to: 33 Do: Do: [|[| :ii:ii || 11 to: to: 10 10 Do: Do: [|[| :j:j || (ii*3)+1 (ii*3)+1 to: to: (ii*3)+4 (ii*3)+4 Do: Do: [|[| :k:k || kk asString, asString, 'x', 'x', jj asString, asString, '='; '='; print. print. (k*j) (k*j) << 10 10 ifTrue: ifTrue: ['[' ' ' print]. print]. (k*j) asString, '\t'; print. (k*j) asString, '\t'; print. ].]. '''' printLine. printLine. ].]. '\n' '\n' print. print. ].].
  82. Code to Code Laskin RPL #!/usr/bin/laskin #!/usr/bin/laskin ## ./mt9x9.laskin ./mt9x9.laskin

    |||| laskin laskin mt9x9.laskin mt9x9.laskin /*/*rpl rplmt9x9.rpl mt9x9.rpl2> 2>/dev/null /dev/null*/*/ (( MAIN MAIN << << 1199for forII 1199for forJJ """" IIII22++for forKK KK->str ->str++"x" "x"++JJ->str ->str++"=" "="++ KKJJ**ifif10 10<<then then""""++end end KKJJ**->str ->str++"\t" "\t"++ next next disp disp next next """"disp disp 33step step >> >> >string >string .... "x" "x" .... >string .. "=" >string .. "=" .... over over over over ** dup dup 10 < ( 10 < ( "" "" .... )) ifif >string >string .... "\t" "\t" .... )) -> -> item item 11 dup dup (( 99 <= <= )) (( 11 dup dup (( 99 <= <= )) (( over over over over over over item item 11 ++ over over item over over item 11 ++ over over over over item item "\n" .. "\n" .. drop drop 11 ++ dup dup )) while while """" .. drop drop 33 ++ dup dup )) while while drop drop
  83. Code to Code Haskell ---- ghc ghc mt9x9.hs mt9x9.hs &&

    && ./mt9x9 ./mt9x9 |||| runghc runghc mt9x9.hs mt9x9.hs import import Control.Monad Control.Monad main main == do do forM_ forM_ [1,4..9] [1,4..9] $$ \i\i -> -> do do forM_ [1..9] $ \j -> forM_ [1..9] $ \j -> do do forM_ [i, i+1, i+2] forM_ [i, i+1, i+2] $$ \k\k -> -> do do putStr putStr (show (show kk ++ ++ "x" "x" ++ ++ show show jj ++ ++ "=" "=" ++ ++ (if(if (k*j) < 10 then " " else "") ++ (k*j) < 10 then " " else "") ++ show show (k*j) (k*j) ++ ++ "\t") "\t") putStrLn putStrLn """" putChar putChar '\n' '\n' Elixir #!/usr/bin/elixir #!/usr/bin/elixir ## ./mt9x9.exs ./mt9x9.exs |||| elixir elixir mt9x9.exs mt9x9.exs Enum.each(Stream.take_every(1..9, Enum.each(Stream.take_every(1..9, 3), 3), fnfn ii -> -> Enum.each(Enum.sort(1..9), Enum.each(Enum.sort(1..9), fnfn jj -> -> Enum.each([i, i+1, i+2], fn k -> Enum.each([i, i+1, i+2], fn k -> IO.write IO.write "#{k}x#{j}=” "#{k}x#{j}=” IO.write IO.write ‘#{String.pad_leading(to_string(k*j),2)}\t" ‘#{String.pad_leading(to_string(k*j),2)}\t" end) end) IO.write IO.write "\n" "\n" end) end) IO.puts IO.puts """" end) end)
  84. Code to Code K3 APL // kona kona -b=0 -b=0

    mt9x9.k3 mt9x9.k3 ⍝ ⍝ apl apl -s-s --OFF --OFF -f-f mt9x9.apl mt9x9.apl item: item: {s:z*y; {s:z*y; `0:$z; `0:$z; `0:"x"; `0:"x"; `0:$y; `0:$y; `0:"="; `0:"="; if[s<10;`0:" if[s<10;`0:" "]; "]; `0:$s; `0:$s; `0:"\t"} `0:"\t"} line: line: {while[z<(x+3); {while[z<(x+3); item[x;y;z]; item[x;y;z]; z+:1]; z+:1]; `0:"\n"} `0:"\n"} block: {while[y<10; line[x;y;x]; y+:1]; `0:"\012"} block: {while[y<10; line[x;y;x]; y+:1]; `0:"\012"} {while[x<10; {while[x<10; block[x;y]; block[x;y]; x+:3]}[1;1] x+:3]}[1;1] \\\\ item←{( item←{(⎕ ⎕UCS UCS 8),( 8),(⍕⍵ ⍕⍵),'x',( ),'x',(⍕⍺ ⍕⍺),'=', ),'=', ((((⎕ ⎕UCS UCS 0) 0) ' ' ')[1+( ')[1+(⍵ ⍵××⍺ ⍺)<10],( )<10],(⍕⍵ ⍕⍵××⍺ ⍺),"\t"} ),"\t"} line←{ line←{⍵ ⍵ item¨ item¨ ((⍳ ⍳3)+ 3)+⍺ ⍺-1 -1 ⋄ ⋄"\0"} "\0"} block←{ ⍵ line¨ ⍳ 9 ⋄ →( ⍵ =7)/0 block←{⍵ line¨ ⍳9 ⋄ →(⍵=7)/0 ⋄ ⋄''}''} __ ← ← block¨ block¨ ¯2+3× ¯2+3×⍳⍳33
  85. Code to Code Idris Pure ---- idris idris mt9x9.idr mt9x9.idr

    -o -o mt9x9 mt9x9 && && ./mt9x9 ./mt9x9 ////pure pure-c-cmt9x9.pure mt9x9.pure-o -omt9x9 mt9x9&& &&./mt9x9 ./mt9x9||||pure puremt9x9.pure mt9x9.pure item item :: Nat Nat -> -> Nat Nat -> -> String String item item jj kk == (show (show k)++"x"++(show k)++"x"++(show j)++"="++ j)++"="++ (if(if k*j k*j << 10 10 then then "" "" else else "")++(show "")++(show (k*j))++" (k*j))++" "" line line :: Nat Nat -> -> Nat Nat -> -> String String line i j = unwords $ map line i j = unwords $ map (item (item j)j) [(i)..(i+2)] [(i)..(i+2)] block block :: Nat Nat -> -> String String block i = unlines block i = unlines $$ map map (line (line i)i) [1..9] [1..9] main : IO () main : IO () main main == putStr putStr $$ unlines unlines $$ map map block block [1, [1, 4,4, 7]7] using usingsystem; system; map block map block[1, [1,4,4,7]7]with with block i = map (line block i = map (linei)i)(1..9); (1..9); line linei ij j==map map(item (itemj)j)(i..i+2); (i..i+2); item j k = printf ("%dx%d=%2d%s") item j k = printf ("%dx%d=%2d%s")(k, (k,j,j,k*j, k*j, (if(ifkkmod 3~=0 then "\t" else if j==9 then mod 3~=0 then "\t" else if j==9 then"\n\n" "\n\n"else else"\n")); "\n")); end; end;
  86. Code to Code Clean Agda ////clm clm-nt -ntmt9x9 mt9x9-o -omt9x9

    mt9x9&& &&./mt9x9 ./mt9x9 {-# {-#OPTIONS OPTIONS--guardedness --guardedness#-} #-} ----agda agda-i-i/usr/share/Agda-stdlib/src /usr/share/Agda-stdlib/src-c-cmt9x9.agda mt9x9.agda&& &&./mt9x9 ./mt9x9 module modulemt9x9 mt9x9 import importStdEnv StdEnv item itemjjkk==toString toStringkk+++ +++"x" "x"+++ +++toString toStringjj+++ +++"=" "="+++ +++ ifif(k*j (k*j<<10) 10)""""""""+++ +++toString toString(k*j) (k*j)+++ +++"\t" "\t" line lineiijj==map map(item (itemj)j)[i[i....i+2] i+2]++ ++["\n"] ["\n"] block blockii==flatten flatten(map (map(line (linei)i)[1[1....9]) 9])++ ++["\n"] ["\n"] Start Start==abort abort(foldr (foldr(+++) (+++)""""(flatten (flatten(map (mapblock block[1, [1,44....9]))) 9]))) module modulemt9x9 mt9x9where where open openimport importData.Nat Data.Natusing using((ℕ ℕ;;_+_; _+_;_*_) _*_) open import Data.Nat.Show using (show) open import Data.Nat.Show using (show) open openimport importData.String Data.Stringusing using(String; (String;padLeft; padLeft;_++_; _++_;concat) concat) open import Data.List using ([]; map; _∷_; upTo) open import Data.List using ([]; map; _∷_; upTo) open openimport importText.Printf Text.Printfusing using(printf) (printf) open import IO using (Main; run; open import IO using (Main; run;putStr) putStr) item item::ℕ ℕ→ →ℕ ℕ→ →String String item itemj jkk==printf printf"%ux%u=%s\t" "%ux%u=%s\t"kkj j(padLeft (padLeft' '' '22(show (show(k(k**j))) j))) line : ℕ → ℕ → String line : ℕ → ℕ → String line linei ij j==concat concat(map (map(item (item(j(j++1)) 1))(i(i∷ ∷(i(i++1)1)∷ ∷(i(i++2)2)∷ ∷[])) []))++ ++"\n" "\n" block : ℕ → String block : ℕ → String block blocki i==concat concat(map (map(line (linei)i)(upTo (upTo9)) 9))++ ++"\n" "\n" main : Main main : Main main main==run run(putStr (putStr(concat (concat(map (mapblock block(1(1∷ ∷44∷ ∷77∷ ∷[])))) []))))
  87. Code to Code Eiffel ----se seccmt9x9.e mt9x9.e-clean -clean-o-omt9x9 mt9x9&& &&./mt9x9

    ./mt9x9 class MT9X9 class MT9X9 create create{ANY} {ANY} make make feature feature{ANY} {ANY} make make local locali:i:INTEGER INTEGER do do from i from i:=:=11 until untili i>>99 loop loop block(i) block(i) print("%N") print("%N") i i:=:=i i++33 end end end end block block(i:(i:INTEGER) INTEGER) local localj:j:INTEGER INTEGER do do from j from j:=:=11 until untilj j>>99 loop loop line(i, line(i,j)j) io.put_new_line io.put_new_line j j:=:=j j++11 end end end end line (i, line (i,j:j:INTEGER) INTEGER) local localk:k:INTEGER INTEGER do do from fromkk:=:=i i until untilkk>>i+2 i+2 loop loop io.put_string(k.out io.put_string(k.out++"x" "x"++j.out j.out++"=") "=") io.put_string(if io.put_string(ifk*j<10 k*j<10then then""""else else""""end) end) io.put_string((k*j).out + "%T") io.put_string((k*j).out + "%T") kk:=:=kk++11 end end end end end end Prolog % % gplc gplc mt9x9.prolog mt9x9.prolog && && ./mt9x9 ./mt9x9 :-:- initialization(main). initialization(main). item(I,J,K) item(I,J,K) :-:KK =< =< I+2 I+2 -> -> (( format('%dx%d=%2d\t',[K,J,K*J]), format('%dx%d=%2d\t',[K,J,K*J]), item(I,J,K+1) item(I,J,K+1) );); format('~n',[]). format('~n',[]). line(I,J) line(I,J) :-:JJ =< =< 99 -> -> (( item(I,J,I), item(I,J,I), line(I,J+1) line(I,J+1) );); nl. nl. block(I) block(I) :-:II =< =< 99 -> -> (( line(I,1), line(I,1), block(I+3) block(I+3) );); halt. halt. main main :-:block(1). block(1).
  88. Code to Code Erlang % %erlc erlcmt9x9.erl mt9x9.erl&& &&erl erl-noshell

    -noshell-s-smt9x9 mt9x9start start-s-sinit initstop stop -module(mt9x9). -module(mt9x9). -export([start/0]). -export([start/0]). start() start()-> -> [block(I) [block(I)||||II<<-lists:seq(1, lists:seq(1,9,9,3)]. 3)]. block(I) -> block(I) -> [line(I, [line(I,J)J)||||JJ<<-lists:seq(1, lists:seq(1,9)], 9)], io:fwrite("~n"). io:fwrite("~n"). line(I, line(I,J)J)-> -> [io:format("~Bx~B=~2B\t", [io:format("~Bx~B=~2B\t",[K, [K,J,J,K*J]) K*J])||||KK<<-lists:seq(I, lists:seq(I,I+2)], I+2)], io:nl(). io:nl(). EScript #!/usr/bin/escript #!/usr/bin/escript % %./mt9x9.escript ./mt9x9.escript||||escript escriptmt9x9.escript mt9x9.escript main(_) main(_)-> -> [block(I) [block(I)||||II<<-lists:seq(1, lists:seq(1,9,9,3)]. 3)]. block(I) block(I)-> -> [line(I, [line(I,J)J)||||JJ<<-lists:seq(1, lists:seq(1,9)], 9)], io:fwrite("~n"). io:fwrite("~n"). line(I, line(I,J)J)-> -> [io:format("~Bx~B=~2B\t", [io:format("~Bx~B=~2B\t",[K, [K,J,J,K*J]) K*J])||||KK<<-lists:seq(I, lists:seq(I,I+2)], I+2)], io:nl(). io:nl().
  89. Code to Code ATS //// patscc patscc mt9x9.dats mt9x9.dats -o

    -o mt9x9 mt9x9 && && ./mt9x9 ./mt9x9 #include #include "share/atspre_staload.hats" "share/atspre_staload.hats" implement implement main0() main0() == block(1) block(1) where where {{ fun fun item(i: item(i: int, int, j:j: int, int, k:k: int): int): void void == ifif kk <= i+2 then ( <= i+2 then ( print!(k, print!(k, "x", "x", j,j, "=", "=", (if(if k*j < 10 then k*j < 10 then "" "" else else ""): ""): string, string, k*j, k*j, "\t"); "\t"); item(i, j, k+1) item(i, j, k+1) )) fun fun line(i: line(i: int, int, j:j: int): int): void void == ifif jj <= <= 99 then then (( item(i, item(i, j,j, i);i); print("\n"); print("\n"); line(i, line(i, j+1) j+1) )) fun fun block(i: block(i: int): int): void void == ifif ii <= 9 then ( <= 9 then ( line(i, line(i, 1); 1); print_newline(); print_newline(); block(i+3) block(i+3) )) }} Miranda #!/usr/bin/miranda #!/usr/bin/miranda -exec -exec |||| ./mt9x9.mira || miranda ./mt9x9.mira || miranda -exec -exec mt9x9.mira mt9x9.mira main main == concat concat (map (map block block [1, [1, 4,4, 7]) 7]) where where block block ii == concat concat (map (map line line [1..9]) [1..9]) ++ ++ "\n" "\n" where where line line jj == concat concat (map (map item item [i..i+2]) [i..i+2]) ++ ++ "\n" "\n" where where item item kk == shownum shownum kk ++ ++ "x" "x" ++ ++ shownum shownum jj ++ ++ "=" "=" ++ ++ rjustify rjustify 22 (shownum (shownum (k*j)) (k*j)) ++ ++ "\t" "\t"
  90. Code to Code Grain //// grain grain mt9x9.gr mt9x9.gr ||||

    grain grain run run mt9x9.gr.wasm mt9x9.gr.wasm import import File File from from "sys/file" "sys/file" import Range from import Range from "range" "range" let let item item == (j,(j, k)k) => => {{ File.fdWrite(File.stdout, File.fdWrite(File.stdout, toString(k) toString(k) ++ ++ "x") "x") File.fdWrite(File.stdout, toString(j) ++ File.fdWrite(File.stdout, toString(j) ++ "=") "=") ifif (k*j (k*j << 10) 10) {{ File.fdWrite(File.stdout, File.fdWrite(File.stdout, "" "" ++ ++ toString(k*j) toString(k*j) ++ ++ "\t") "\t") }} else else {{ File.fdWrite(File.stdout, File.fdWrite(File.stdout, toString(k*j) toString(k*j) ++ ++ "\t") "\t") }} void void }} let let line line == (i,(i, j)j) => => {{ Range.forEach(k Range.forEach(k => => item(j, item(j, k), k), Range.Inclusive(i, Range.Inclusive(i, i+2)) i+2)) print("") print("") }} let let block block == (i) (i) => => {{ Range.forEach(j Range.forEach(j => => line(i*3+1, line(i*3+1, j),j), Range.Inclusive(1, Range.Inclusive(1, 9)) 9)) print("") print("") }} Range.forEach(i Range.forEach(i => => block(i), block(i), Range.Inclusive(0, Range.Inclusive(0, 2)) 2)) Roc #!/usr/bin/roc #!/usr/bin/roc ##./mt9x9.roc ./mt9x9.roc||||roc rocmt9x9.roc mt9x9.roc app app[main] [main]{{pf: pf:platform platform"https://github.com/roc-lang/ "https://github.com/roc-lang/\\ basic-cli/releases/download/0.10.0/ basic-cli/releases/download/0.10.0/\\ vNe6s9hWzoTZtFmNkvEICPErI9ptji_ySjicO6CkucY.tar.br" vNe6s9hWzoTZtFmNkvEICPErI9ptji_ySjicO6CkucY.tar.br"}} import importpf.Stdout pf.Stdout import importpf.Task pf.Taskexposing exposing[loop] [loop] main main== loop! loop!{{i:i:1,1,j:j:0,0,k:k:00}}block block block block==\s\s-> -> ififs.i s.i<= <=99then then loop! loop!{{i:i:s.i, s.i,j:j:1,1,k:k:00}}line line Task.ok Task.ok(Step (Step{{i:i:s.i s.i++3,3,j:j:s.j, s.j,k:k:s.k s.k})}) else else Task.ok Task.ok(Done (Done{}) {}) line = \s -> line = \s -> ififs.j s.j<= <=99then then loop! loop!{{i:i:s.i, s.i,j:j:s.j, s.j,k:k:s.i s.i}}item item Task.ok Task.ok(Step (Step{{i:i:s.i, s.i,j:j:s.j s.j++1,1,k:k:s.k s.k})}) else else Stdout.line! Stdout.line!"""" Task.ok Task.ok(Done (Done{}) {}) item item==\s\s-> -> ififs.k s.k<= <=s.i s.i++22then then Stdout.write! Stdout.write!"$(Num.toStr "$(Num.toStrs.k)x$(Num.toStr s.k)x$(Num.toStrs.j)=" s.j)=" Stdout.write! "$(if (s.k * s.j) < Stdout.write! "$(if (s.k * s.j) <10 10then then""""else else"")" "")" Stdout.write! Stdout.write!"$(Num.toStr "$(Num.toStr(s.k (s.k**s.j))\t" s.j))\t" Task.ok Task.ok(Step (Step{{i:i:s.i, s.i,j:j:s.j, s.j,k:k:s.k s.k++11})}) else else Stdout.write! Stdout.write!"\n" "\n" Task.ok Task.ok(Done (Done{}) {})
  91. Code to Code SNOBOL ** snobol4 snobol4 -b -b mt9x9.sno

    mt9x9.sno |||| snobol5 snobol5 mt9x9.sno mt9x9.sno ii == 11 block block jj == 11 line line kk == ii ss == """" item item ss == ss kk "x" "x" jj "=" "=" LPAD(k LPAD(k ** j,j, 2) 2) CHAR(9) CHAR(9) kk == ?LT(k, :S(item) ?LT(k, ii ++ 2) 2) kk ++ 11 :S(item) OUTPUT = s OUTPUT = s jj == ?LT(j, :S(line) ?LT(j, 9) 9) jj ++ 11 :S(line) OUTPUT OUTPUT == """" ii == ?LT(i, :S(block) ?LT(i, 7) 7) ii ++ 33 :S(block) END END Cognate ~~ ~~ cognac cognac mt9x9.cog mt9x9.cog -run -run Def Def Item Item (( Let Let J;J; Let Let K; K; Puts Puts (K"x"J"="); (K"x"J"="); Put Put IfIf << 10 10 ** KK JJ then then "" "" else else ""; ""; Puts (* K J"\t") Puts (* K J"\t") );); Def Def Line Line (( Let Let I;I; Let Let J;J; Map Map (Item (Item J)J) Range Range II ++ II 3;3; Drop; Drop; Print Print """" );); Def Def Block Block (( Let Let II as as block block number; number; Map (Line Map (Line I)I) over over Range Range 11 toto 10; 10; Drop; Drop; Print Print """" );); (Block); (Block); For For List List (1 (1 44 7); 7);
  92. Code to Code M4 dnl dnlm4 m4mt9x9.m4 mt9x9.m4 dnl dnl

    define(`item', define(`item',`$2x$1=ifelse(eval($2*$1<10), `$2x$1=ifelse(eval($2*$1<10),1,1,``')eval($2*$1) ')eval($2*$1)⇥ ⇥')dnl ')dnl define(`line', define(`line',`ifelse(eval($3<=eval($1+2)), `ifelse(eval($3<=eval($1+2)),1,1,item($2, item($2,$3)dnl $3)dnl `line($1, `line($1,$2, $2,incr($3))')')dnl incr($3))')')dnl define(`block', define(`block',`ifelse(eval($2<=9), `ifelse(eval($2<=9),1,1,line($1, line($1,$2, $2,$1) $1) `block($1, incr($2))')')dnl `block($1, incr($2))')')dnl define(`main', define(`main',`ifelse(eval($1<=9), `ifelse(eval($1<=9),1,1,block($1, block($1,1)1) `main(eval($1+3))')')dnl `main(eval($1+3))')')dnl main(1)dnl main(1)dnl dnl dnl Numbat #!/usr/bin/numbat #!/usr/bin/numbat ## ./mt9x9.nbt ./mt9x9.nbt |||| numbat numbat mt9x9.nbt mt9x9.nbt fnfn item(j: item(j: Scalar, Scalar, k:k: Scalar) Scalar) -> -> String String == "{k}x{j}={k*j:2}\t" "{k}x{j}={k*j:2}\t" fnfn line(i: line(i: Scalar, Scalar, j:j: Scalar, Scalar, k:k: Scalar) Scalar) -> -> String String == ifif kk <= <= i+2 i+2 then then "{item(j, "{item(j, k)}{line(i, k)}{line(i, j,j, k+1)}" k+1)}" else else "\n" "\n" fnfn block(i: Scalar, block(i: Scalar, j:j: Scalar) Scalar) -> -> String String == ifif jj <= <= 99 then then "{line(i, "{line(i, j,j, i)}{block(i, i)}{block(i, j+1)}" j+1)}" else else ifif ii << 77 then then "\n" "\n" else else """" fnfn main(i: main(i: Scalar) Scalar) -> -> String String == ifif ii <= <= 99 then then "{block(i, "{block(i, 1)}{main(i+3)}" 1)}{main(i+3)}" else "" else "" print(main(1)) print(main(1))
  93. Code to Code Lily #!/usr/bin/lily #!/usr/bin/lily ## ./mt9x9.lily ./mt9x9.lily ||||

    lily lily mt9x9.lily mt9x9.lily for for ii inin 1...9 1...9 by by 3:3: {{ for for jj inin 1...9: 1...9: {{ foreach foreach kk inin [i,[i, i+1, i+1, i+2]: i+2]: {{ stdout.write("{}x{}=".format(k, stdout.write("{}x{}=".format(k, j)) j)) ifif k*j < 10: { k*j < 10: { stdout.write(" stdout.write(" ")") }} stdout.write("{}\t".format(k*j)) stdout.write("{}\t".format(k*j)) }} stdout.write("\n") stdout.write("\n") }} print("") print("") }} Icon #!/usr/bin/icon #!/usr/bin/icon ## ./mt9x9.icn ./mt9x9.icn |||| icon icon mt9x9.icn mt9x9.icn ## |||| iconc mt9x9.icn && iconc mt9x9.icn && ./mt9x9 ./mt9x9 procedure procedure main() main() local i, j, k local i, j, k every every ii := := 11 toto 99 by by 33 do do {{ every every jj := := 11 toto 99 do do {{ every every kk := := ![i, ![i, i+1, i+1, i+2] i+2] do do writes(k, "x", j, "=", right(k*j,2), writes(k, "x", j, "=", right(k*j,2), "\t") "\t") writes("\n") writes("\n") }} write() write() }} end end
  94. Code to Code Gravity //// gravity gravity mt9x9.gravity mt9x9.gravity func

    func main() main() {{ for for (var (var ii inin [1, [1, 4,4, 7]) 7]) {{ for for (var (var jj inin 1...9) 1...9) {{ for for (var (var kk inin i...i+2) i...i+2) {{ System.put(k, System.put(k, "x", "x", j,j, "=") "=") ifif (k*j < 10) System.put(" (k*j < 10) System.put(" ")") System.put(k*j, System.put(k*j, "\t") "\t") }} System.put("\n") System.put("\n") }} System.print() System.print() }} System.exit(0) System.exit(0) }} Wren #!/usr/bin/wren #!/usr/bin/wren ////./mt9x9.wren ./mt9x9.wren||||wren wrenmt9x9.wren mt9x9.wren for for(i(iinin(1...10).where (1...10).where{|n| {|n|nn% %33== ==11})}){{ for for(j(jinin1..9) 1..9){{ [i,[i,i+1, i+1,i+2].each i+2].each{|k| {|k| System.write("%(k)x%(j)=%(k*j<10?" System.write("%(k)x%(j)=%(k*j<10?"":"")%(k*j)\t") ":"")%(k*j)\t") }} System.write("\n") System.write("\n") }} System.print() System.print() }}
  95. Code to Code Falcon #!/usr/bin/falcon #!/usr/bin/falcon -M -M //// ./mt9x9.fal

    || falcon ./mt9x9.fal || falcon mt9x9.fal mt9x9.fal for for ii inin [1:9:3] [1:9:3] for for jj == 11 toto 99 for for kk inin [i,[i, i+1, i+1, i+2] i+2] ss == k*j k*j >> >> @"$(k)x$(j)=$(s:2r)\t" @"$(k)x$(j)=$(s:2r)\t" end end printl() printl() end end >> end end Flax //// flaxc flaxc mt9x9.flx mt9x9.flx && && ./mt9x9 ./mt9x9 |||| flaxc flaxc -run -run mt9x9.flx mt9x9.flx import import libc libc as as __ import import std::io std::io as as __ @entry @entry fnfn main() main() {{ for for ii inin [1, [1, 4,4, 7]7] {{ for for jj inin 1...9 1...9 {{ for for kk inin i...i+2 i...i+2 step step 11 => => printf("%dx%d=%2d\t", printf("%dx%d=%2d\t", k,k, j,j, k*j) k*j) printf("\n") printf("\n") }} println() println() }} }}
  96. Code to Code Swift //// swiftc swiftc mt9x9.swift mt9x9.swift &&

    && ./mt9x9 ./mt9x9 |||| swift swift mt9x9.swift mt9x9.swift import import Foundation Foundation for for ii inin stride(from: stride(from: 1,1, to: to: 9,9, by: by: 3) 3) {{ for for jj inin 1...9 1...9 {{ for for kk inin [i,[i, i+1, i+1, i+2] i+2] {{ print(String(format:"%dx%d=%2d", print(String(format:"%dx%d=%2d", k,k, j,j, k*j), k*j), terminator:"\t") terminator:"\t") }} print() print() }} print() print() }} Dao #!/usr/bin/dao #!/usr/bin/dao ## ./mt9x9.dao ./mt9x9.dao |||| dao dao mt9x9.dao mt9x9.dao for(var for(var ii == 1:3:10) 1:3:10) {{ for(var for(var jj == 1:10) 1:10) {{ for(var for(var kk inin {i,{i, i+1, i+1, i+2}) i+2}) io.writef("%dx%d=%2d\t", io.writef("%dx%d=%2d\t", k,k, j,j, k*j) k*j) io.write("\n") io.write("\n") }} io.writeln() io.writeln() }}
  97. Code to Code Covariant Script #!/usr/bin/covscript #!/usr/bin/covscript ## ./mt9x9.csc ./mt9x9.csc

    |||| covscript covscript mt9x9.csc mt9x9.csc foreach foreach ii inin {1, {1, 4,4, 7} 7} foreach foreach jj inin range(1, range(1, 10) 10) for k = i, k <= i+2, k++ for k = i, k <= i+2, k++ system.out.print(to_string(k)+"x"+to_string(j)+"=") system.out.print(to_string(k)+"x"+to_string(j)+"=") system.out.print(k*j system.out.print(k*j << 10 10 ?? "" "" :: "") "") system.out.print(to_string(k*j)+"\t") system.out.print(to_string(k*j)+"\t") end end system.out.print("\n") system.out.print("\n") end end system.out.println("") system.out.println("") end end DuckScript #!/usr/bin/duck #!/usr/bin/duck ## ./mt9x9.ds ./mt9x9.ds |||| duck duck mt9x9.ds mt9x9.ds II == array array 11 44 77 for i for i inin ${I} ${I} JJ == range range 11 10 10 for j in ${J} for j in ${J} KK == range range 00 33 for k for k inin ${K} ${K} kk == calc calc ${i}+${k} ${i}+${k} ss == calc calc ${k}*${j} ${k}*${j} print ${k}x${j}= print ${k}x${j}= ifif less_than less_than ${s} ${s} 10 10 print " " print " " end end print print ${s}\t ${s}\t end end print print \n\n end end echo echo end end
  98. Code to Code J #!/usr/bin/ijconsole #!/usr/bin/ijconsole NB. NB. ./mt9x9.ijs ./mt9x9.ijs

    |||| ijconsole ijconsole mt9x9.ijs mt9x9.ijs 33 :: 00 '''' for_i. for_i. 11 ++ 33 ** i.i. 33 do. do. for_j. for_j. 11 ++ i.i. 99 do. do. ss =: =: '''' for_k. for_k. ii ++ i.i. 33 do. do. ss =: s, (":k), =: s, (":k), 'x', 'x', (":j), (":j), '=', '=', (>'2.0' (>'2.0' 8!:0 8!:0 k*j), k*j), TAB TAB end. end. smoutput smoutput ss end. end. smoutput smoutput '''' end. end. )) exit exit 00 Nial #!/usr/bin/nial #!/usr/bin/nial -defs -defs ## ./mt9x9.ndf || ./mt9x9.ndf || nial nial -defs -defs mt9x9.ndf mt9x9.ndf for for ii with with 11 ++ (3 (3 ** tell tell 3) 3) do do for for jj with with count count 99 do do for k with i + tell for k with i + tell 33 do do writechars link (string writechars link (string k)k) `x`x (string (string j)j) `=; `=; ifif (k*j) (k*j) << 10 10 then then writechars writechars ' ' ' ' endif; endif; writechars link (string (k*j)) (char writechars link (string (k*j)) (char 9) 9) endfor; endfor; writechars writechars char char 10 10 endfor; endfor; write write '''' endfor; endfor; bye bye
  99. Code to Code BC GEL #!/usr/bin/bc #!/usr/bin/bc -q -q ##

    ./mt9x9.bc || ./mt9x9.bc || bc bc -q -q mt9x9.bc mt9x9.bc #!/usr/bin/genius #!/usr/bin/genius ## ./mt9x9.gel ./mt9x9.gel |||| genius genius mt9x9.gel mt9x9.gel for for (i(i == 1;1; ii <= <= 9;9; ii += += 3) 3) {{ for for (j(j == 1;1; jj <= <= 9;9; j++) j++) {{ for for (k(k == i;i; kk <= <= i+2; i+2; k++) k++) {{ print k, "x", j, "=" print k, "x", j, "=" ifif (k*j (k*j << 10) 10) "" "" print print k*j, k*j, "\t" "\t" }} print print "\n" "\n" }} "" "" }} quit quit for for ii == 11 toto 99 by by 33 do do (( for for jj == 11 toto 99 do do (( for for kk inin [i,[i, i+1, i+1, i+2] i+2] do do (( printn(k+"x"+j+"="); printn(k+"x"+j+"="); ifif k*j k*j << 10 10 then then printn(" printn(" "); "); printn(k*j+"\t") printn(k*j+"\t") );); printn("\n") printn("\n") );); print("") print("") ))
  100. Code to Code Chapel Nelson //// chpl chpl mt9x9.chpl mt9x9.chpl

    && && ./mt9x9 ./mt9x9 % % nelson-cli nelson-cli -q -q -f-f mt9x9.nlf mt9x9.nlf for for ii inin 1..9 1..9 by by 33 {{ for for jj inin 1..9 1..9 {{ for for kk inin [i,[i, i+1, i+1, i+2] i+2] {{ writef("%{#}x%{#}=%{##}\t", writef("%{#}x%{#}=%{##}\t", k,k, j,j, k*j); k*j); }} write('\n'); write('\n'); }} writeln(); writeln(); }} for for ii == 1:3:9 1:3:9 for for jj == 1:9 1:9 ss == ""; ""; for k for k == [i,[i, i+1, i+1, i+2] i+2] ss == ss ++ sprintf("%dx%d=%2d\t", sprintf("%dx%d=%2d\t", k,k, j,j, k*j); k*j); end end disp(s); disp(s); end end disp(""); disp(""); end end exit() exit()
  101. Code to Code Wolfram (*(*mathicsscript mathicsscriptmt9x9.wl mt9x9.wl*)*) For[ For[i i==1,1,i

    i<= <=9,9,i i+= +=3,3, For[ j = 1, j <= 9, For[ j = 1, j <= 9,j++, j++, For[ For[kk==i,i,kk<= <=i+2, i+2,k++, k++, WriteString[ OutputStream[ WriteString[ OutputStream["stdout", "stdout",11],],k,k,"x", "x",j,j,"=" "="];]; WriteString[ WriteString[OutputStream[ OutputStream["stdout", "stdout",11],],If[If[k*j k*j<<10, 10,""",",""""]]];]; WriteString[ OutputStream[ "stdout", 1 ], k*j, "\t" ]; WriteString[ OutputStream[ "stdout", 1 ], k*j, "\t" ]; ];]; WriteString[ WriteString[OutputStream[ OutputStream["stdout", "stdout",11],],"\n" "\n"];]; ];]; If[If[i i<<7,7,Print[ Print[""""]]];]; ];]; MATLAB #!/usr/bin/octave-cli #!/usr/bin/octave-cli % % ./mt9x9.m ./mt9x9.m |||| octave-cli octave-cli mt9x9.m mt9x9.m for for ii == (1:3:9) (1:3:9) for for jj == (1:9) (1:9) for k for k == [i,[i, i+1, i+1, i+2] i+2] printf('%dx%d=%2d\t', printf('%dx%d=%2d\t', k,k, j,j, k*j); k*j); endfor endfor puts("\n"); puts("\n"); endfor endfor disp(''); disp(''); endfor endfor
  102. Code to Code AMPL #!/usr/bin/ampl #!/usr/bin/ampl ##./mt9x9.run ./mt9x9.run||||ampl amplmt9x9.run mt9x9.run

    for for {i{i inin 11 .... 99 by by 3} 3} {{ for for {j{j inin 11 .... 9} 9} {{ for for {k{k inin {i,{i, i+1, i+1, i+2}} i+2}} {{ printf printf "%dx%d=%2d\t", "%dx%d=%2d\t", k,k, j,j, k*j; k*j; }} printf printf "\n"; "\n"; }} printf printf "\n"; "\n"; }} Fortran !!gfortran gfortranmt9x9.f90 mt9x9.f90-o -omt9x9 mt9x9&& &&./mt9x9 ./mt9x9 program programmt9x9 mt9x9 implicit implicitnone none integer :: integer ::i,i,j,j,kk character(len=24) character(len=24)::::format format do doii==1,1,9,9,33 format format=="(3(i1, "(3(i1,a,a,i1, i1,a,a,i2, i2,a))" a))" write(*,format) write(*,format)((k, ((k,'x', 'x',j,j,'=', '=',k*j, k*j,char(9), char(9),kk==i,i,i+2), i+2),jj==1,1,9) 9) write(*,*) write(*,*) end enddo do end endprogram programmt9x9 mt9x9
  103. Code to Code IDL R #!/usr/bin/Rscript #!/usr/bin/Rscript ## ./mt9x9.R ./mt9x9.R

    |||| Rscript Rscript mt9x9.R mt9x9.R for(i for(i inin seq(1, seq(1, 9,9, 3)) 3)) {{ for(j for(j inin 1:9) 1:9) {{ for(k for(k inin list(i, list(i, i+1, i+1, i+2)) i+2)) {{ cat(sprintf("%dx%d=%2d\t", cat(sprintf("%dx%d=%2d\t", k,k, j,j, k*j)) k*j)) }} cat("\n") cat("\n") }} cat("\n") cat("\n") }} ;; gdl gdl -q -q -e -e mt9x9 mt9x9 pro pro mt9x9 mt9x9 for for ii == 1,1, 9,9, 33 do do begin begin for for jj == 1,1, 99 do do begin begin for k = i, i+2 for k = i, i+2 do do begin begin print, k,"x",j,"=",k*j,string(9b), print, k,"x",j,"=",k*j,string(9b), $$ format='($,I1,A,I1,A,I2,A)' format='($,I1,A,I1,A,I2,A)' endfor endfor print, print, string(10b), string(10b), format='($,A)' format='($,A)' endfor endfor print print endfor endfor end end
  104. Code to Code Gnuplot #!/usr/bin/gnuplot #!/usr/bin/gnuplot ## ./mt9x9.plt ./mt9x9.plt ||||

    gnuplot gnuplot mt9x9.plt mt9x9.plt do do for for [i[i == 1:9:3] 1:9:3] for for [j[j == 1:9] 1:9] {{ ss == """" do do for for [k[k == i:i+2] i:i+2] {{ ss == s.sprintf("%dx%d=%2d\t", s.sprintf("%dx%d=%2d\t", k,k, j,j, k*j) k*j) }} ifif (j(j == == 9) 9) {print {print s."\n"} s."\n"} else else {print {print s}s} }} Maxima /*/* maxima maxima --very-quiet --very-quiet << mt9x9.mac mt9x9.mac */*/ ttyoff: ttyoff: true; true; for for i:i: 11 step step 33 thru thru 99 do do (( for for j:j: 11 thru thru 99 do do (( for for kk inin [i,[i, i+1, i+1, i+2] i+2] do do (( printf(true, printf(true, "~dx~d=~2d~a", "~dx~d=~2d~a", k,k, j,j, k*j, k*j, tab) tab) ),), printf(true, printf(true, "~%") "~%") ),), newline() newline() ););
  105. Code to Code SPSS **pspp psppmt9x9.sps mt9x9.sps NEW NEWFILE. FILE.

    INPUT INPUTPROGRAM. PROGRAM. STRING STRING#s #s#s0 #s0TO TO#s2 #s2(A6). (A6). LOOP #i = 1 TO 9 BY LOOP #i = 1 TO 9 BY3.3. LOOP LOOP#j#j==11TO TO9.9. LOOP LOOP#k #k==#i#iTO TO#i+2. #i+2. COMPUTE COMPUTE#s #s==CONCAT(STRING(#k,F1),"x",STRING(#j,F1),"=",STRING(#k*#j,F2)). CONCAT(STRING(#k,F1),"x",STRING(#j,F1),"=",STRING(#k*#j,F2)). IF(#k IF(#k==#i) #i)#s0 #s0==#s. #s. IF(#k IF(#k==#i+1) #i+1)#s1 #s1==#s. #s. IF(#k IF(#k==#i+2) #i+2)#s2 #s2==#s. #s. END ENDLOOP. LOOP. PRINT PRINT/ /#s0(A6) #s0(A6)"" ""#s1(A6) #s1(A6)"⇥ "⇥""#s2(A6). #s2(A6). END ENDLOOP. LOOP. PRINT. PRINT. END ENDLOOP. LOOP. WRITE. WRITE. END ENDFILE. FILE. END ENDINPUT INPUTPROGRAM. PROGRAM. EXECUTE. EXECUTE. Julia #!/usr/bin/julia #!/usr/bin/julia ## ./mt9x9.jl ./mt9x9.jl |||| julia julia mt9x9.jl mt9x9.jl using using Printf Printf for for ii inin 1:3:9, 1:3:9, jj == 1:9, 1:9, kk == [i,[i, i+1, i+1, i+2] i+2] @printf("%dx%d=%2d", k, j, k*j) @printf("%dx%d=%2d", k, j, k*j) print(k!=i+2 print(k!=i+2 ?? "\t" "\t" :: j==9 j==9 ?? "\n\n" "\n\n" :: "\n") "\n") end end
  106. Code to Code Lox Monkey #!/usr/bin/monkeylang #!/usr/bin/monkeylang //// ./mt9x9.mon ./mt9x9.mon

    |||| monkeylang monkeylang mt9x9.mon mt9x9.mon ii == 11 for for (i(i <= <= 9) 9) {{ foreach foreach jj inin 1..9 1..9 {{ foreach foreach kk inin [i,[i, i+1, i+1, i+2] i+2] {{ printf("%dx%d=%2d\t", printf("%dx%d=%2d\t", k,k, j,j, k*j) k*j) }} puts("\n") puts("\n") }} puts("\n") puts("\n") ii += += 33 }} //// clox clox mt9x9.lox mt9x9.lox for for (var (var ii == 1;1; ii <= <= 9;9; ii == ii ++ 3) 3) {{ for for (var (var jj == 1;1; jj <= <= 9;9; jj == jj ++ 1) 1) {{ var var ss == ""; ""; for (var k for (var k == i;i; kk <= <= i+2; i+2; kk == kk ++ 1) 1) {{ ss == ss ++ chr(k+48) chr(k+48) ++ "x" "x" ++ chr(j+48) chr(j+48) ++ "="; "="; ifif (k*j < 10) { (k*j < 10) { ss == ss ++ "" "" ++ chr(k*j+48); chr(k*j+48); }} else else {{ var var dd == 1;1; while while (k*j (k*j >= >= (d+1)*10) (d+1)*10) {{ dd == dd ++ 1;1; }} ss == ss ++ chr(d+48) chr(d+48) ++ chr(k*j-d*10+48); chr(k*j-d*10+48); }} ss == ss ++ chr(9); chr(9); }} print print s;s; }} print print ""; ""; }}
  107. Code to Code Sunder #!/usr/bin/sunder-run #!/usr/bin/sunder-run ## sunder-compile sunder-compile -o

    -o mt9x9 mt9x9 mt9x9.sunder mt9x9.sunder && && ./mt9x9 ./mt9x9 ## |||| sunder-run mt9x9.sunder sunder-run mt9x9.sunder import import "std"; "std"; func func main() main() void void {{ var i = 1u; var i = 1u; for for ii << 10 10 {{ for j for j inin 1:10 1:10 {{ for for KK inin 33 {{ var var kk == ii ++ K; K; var var ss == kk ** j;j; var var ss ss == ""; ""; ifif ss << 10 10 {{ ss ss == "" ";"; }} std::print_format(std::out(), std::print_format(std::out(), "{}x{}={}{}\t", "{}x{}={}{}\t", (:[]std::formatter)[ (:[]std::formatter)[ std::formatter::init[[usize]](&k), std::formatter::init[[usize]](&k), std::formatter::init[[usize]](&j), std::formatter::init[[usize]](&j), std::formatter::init[[[]byte]](&ss), std::formatter::init[[[]byte]](&ss), std::formatter::init[[usize]](&s)]); std::formatter::init[[usize]](&s)]); }} std::print(std::out(), std::print(std::out(), "\n"); "\n"); }} std::print_line(std::out(), std::print_line(std::out(), ""); ""); ii += += 3;3; }} }} HSP ;; hspcmp hspcmp mt9x9.hsp mt9x9.hsp && && hsp3cl hsp3cl mt9x9.ax mt9x9.ax #include #include "hsp3cl.as" "hsp3cl.as" i=1 i=1 repeat repeat 33 j=1 j=1 repeat repeat 99 s="" s="" k=i k=i repeat repeat 33 s+=strf("%dx%d=%2d\t",k,j,k*j) s+=strf("%dx%d=%2d\t",k,j,k*j) k++ k++ loop loop mes mes ss j++ j++ loop loop mes mes i+=3 i+=3 loop loop
  108. Code to Code Io Ursa //// ursa ursa mt9x9.ursa mt9x9.ursa

    let let write write == process.stdout.write process.stdout.write var i = 1 var i = 1 loop loop {{ for for JJ inin range(9) range(9) {{ let let jj == J+1 J+1 for for kk inin [i,[i, i+1, i+1, i+2].iter() i+2].iter() {{ write(k.toString()) write(k.toString()) write("x") write("x") write(j.toString()) write(j.toString()) write("=") write("=") ifif (k*j (k*j << 10) 10) {{ write(" write(" ")") }} write((k*j).toString()) write((k*j).toString()) write("\t") write("\t") }} write("\n") write("\n") }} print() print() ii := := ii ++ 33 ifif (i(i >> 9) 9) {{ break break }} }} #!/usr/bin/io #!/usr/bin/io //// ./mt9x9.io ./mt9x9.io |||| ioio mt9x9.io mt9x9.io for(i, for(i, 1,1, 9,9, 3,3, for(j, for(j, 1,1, 9,9, list(i, list(i, i+1, i+1, i+2) i+2) foreach(k, foreach(k, write(k, "x", j, write(k, "x", j, "=", "=", if(k*j<10," if(k*j<10," ",""), ",""), k*j, k*j, "\t") "\t") )) """" println println )) writeln writeln ))
  109. Code to Code. Arturo #!/usr/bin/arturo #!/usr/bin/arturo ;; ./mt9x9.art ./mt9x9.art ||||

    arturo arturo mt9x9.art mt9x9.art loop loop 1..9 1..9 .step:3 .step:3 [i][i] [[ loop loop 1..9 1..9 [j][j] [[ loop loop @[i @[i i+1 i+1 i+2] i+2] [k] [k] [[ prints prints ~"|k|x|j|=" ~"|k|x|j|=" prints prints (to (to :string :string .format:"2d" .format:"2d" k*j)++"\t" k*j)++"\t" ]] prints prints "\n" "\n" ]] print print """" ]] Vimscript "" vim vim --cmd --cmd 'source 'source mt9x9.vim' mt9x9.vim' for for ii inin range(1, range(1, 9,9, 3) 3) for for jj inin range(1, range(1, 9) 9) for for kk inin [i,[i, ii ++ 1,1, ii ++ 2]2] echon echon k'x'j'='k k'x'j'='k ** jj << 10 10 ?? ' ' ' ' :: ''k ''k ** j"\t" j"\t" endfor endfor echon echon "\n" "\n" endfor endfor echo echo """" endfor endfor quit quit
  110. Code to Code Verilog //// iverilog iverilog mt9x9.vlg mt9x9.vlg -o

    -o mt9x9 mt9x9 && && ./mt9x9 ./mt9x9 module module mt9x9; mt9x9; integer integer i,i, j,j, k;k; initial initial begin begin for(i for(i == 1;1; ii <= <= 9;9; ii += += 3) 3) begin begin for(j = 1; j <= 9; j++) begin for(j = 1; j <= 9; j++) begin for(k for(k == i;i; kk <= <= i+2; i+2; k++) k++) begin begin $write("%0dx%0d=%2d\t", $write("%0dx%0d=%2d\t", k,k, j,j, k*j); k*j); end end $write("\n"); $write("\n"); end end $display(); $display(); end end end end endmodule endmodule VHDL ---- ghdl ghdl -c-c mt9x9.vhd mt9x9.vhd -e -e mt9x9 mt9x9 && && ./mt9x9 ./mt9x9 LIBRARY std; LIBRARY std; USE std.TEXTIO.all; USE std.TEXTIO.all; entity mt9x9 entity mt9x9 isis end mt9x9; end mt9x9; architecture architecture mt9x9 mt9x9 ofof mt9x9 mt9x9 isis begin begin process process variable k:k: integer; variable i,s:i, j,j,line; integer; variable variable s: line; begin begin for ii inin 11 toto 99 loop fornext when iloop mod 33 /= next when /= 1;1; for jj inin 11 toto 9i9mod loop forfor loop kk inin ii toto i+2 forwrite(s, i+2 loop loop k); write(s, k); write(s, write(s, 'x'); write(s, j);'x'); write(s, j); write(s, '='); write(s, '=');right, 2); write(s, k*j, write(s, k*j, right, 2); write(s, character'val(9)); write(s, character'val(9)); end loop; end loop; writeline(OUTPUT, s); writeline(OUTPUT, s); end loop; end loop; write(s, write(s, character'val(0)); character'val(0)); writeline(OUTPUT, s); writeline(OUTPUT, s); end loop; end loop; wait; wait; end process; end process; end end mt9x9; mt9x9;
  111. Code to Code MUMPS #!/usr/bin/mumps #!/usr/bin/mumps ;;./mt9x9.mps ./mt9x9.mps||||mumps mumpsmt9x9.mps mt9x9.mps

    mt9x9 mt9x9 for for i=1:3:9 i=1:3:9 do do .. for j=1:1:9 for j=1:1:9 do do .... for for k=i,i+1,i+2 k=i,i+1,i+2 do do ...... write write k,"x",j,"=",$justify(k*j,2),$char(9) k,"x",j,"=",$justify(k*j,2),$char(9) .... write $char(10) write $char(10) .. write write !! Daslang //// daScript daScript mt9x9.das mt9x9.das require require strings strings [export] [export] def def main main for for ii inin [[int[3] [[int[3] 1;1; 4;4; 7]] 7]] for j in range(1, 10) for j in range(1, 10) for for kk inin range(i, range(i, i+3) i+3) print("{k}x{j}={format("%2d", print("{k}x{j}={format("%2d", k*j)}\t") k*j)}\t") print("\n") print("\n") print("\n") print("\n")
  112. Code to Code ABC \\ abclang abclang << mt9x9.abc mt9x9.abc

    FOR FOR ii IN IN {1; {1; 4;4; 7}: 7}: FOR FOR jj IN IN {1..9}: {1..9}: FOR FOR kk IN IN {i..i+2}: {i..i+2}: WRITE "`k`x`j`=`k*j>>2``"">>2`" WRITE "`k`x`j`=`k*j>>2``"">>2`" WRITE WRITE // WRITE WRITE // F# //// fsharpc fsharpc mt9x9.fs mt9x9.fs && && mono mono mt9x9.exe mt9x9.exe //// |||| fsharpi --quiet --exec mt9x9.fs fsharpi --quiet --exec mt9x9.fs module module mt9x9 mt9x9 for for ii inin 1..3..9 1..3..9 do do for j in 1..9 do for j in 1..9 do List.iter List.iter (fun (fun kk -> -> printf printf "%dx%d=%2d\t" "%dx%d=%2d\t" kk jj (k*j)) (k*j)) [i;[i; i+1; i+1; i+2] i+2] printf "\n" printf "\n" printfn printfn """"
  113. Code to Code Python #!/usr/bin/python3 #!/usr/bin/python3 ## ./mt9x9.py3 ./mt9x9.py3 ||||

    python3 python3 mt9x9.py3 mt9x9.py3 for for ii inin range(1, range(1, 10, 10, 3): 3): for for jj inin range(1, range(1, 10): 10): for k in [i, i+1, for k in [i, i+1, i+2]: i+2]: print(f"{k}x{j}={k*j:2}", print(f"{k}x{j}={k*j:2}", end='\t') end='\t') print(end='\n') print(end='\n') print() print() Boo #!/usr/bin/booi #!/usr/bin/booi //// booc booc mt9x9.boo mt9x9.boo && && mono mono mt9x9.exe mt9x9.exe |||| ./mt9x9.boo ./mt9x9.boo //// |||| booi mt9x9.boo booi mt9x9.boo for for ii inin range(1, range(1, 10, 10, 3): 3): for j in range(1, 10): for j in range(1, 10): for for kk as as int int inin [i,[i, i+1, i+1, i+2]: i+2]: System.Console.Write("${k}x${j}=") System.Console.Write("${k}x${j}=") ifif k*j k*j << 10: 10: System.Console.Write(" System.Console.Write(" ")") System.Console.Write("${k*j}\t") System.Console.Write("${k*j}\t") print("") print("") print print
  114. Code to Code Snek #!/usr/bin/snek #!/usr/bin/snek ## ./mt9x9.py ./mt9x9.py ||||

    snek snek mt9x9.py mt9x9.py for for ii inin range(1, range(1, 10, 10, 3): 3): for for jj inin range(1, range(1, 10): 10): for k in [i, i+1, for k in [i, i+1, i+2]: i+2]: print("%dx%d=" print("%dx%d=" % % (k, (k, j),j), end='') end='') ifif k*j k*j << 10: 10: print(" print(" ",", end='') end='') print(k*j, end='\t') print(k*j, end='\t') print(end='\n') print(end='\n') print() print() 11l ‘‘ 11l 11l mt9x9.11l mt9x9.11l && && ./mt9x9 ./mt9x9 ’’ L(i) L(i) (1.<10).step(3) (1.<10).step(3) L(j) L(j) 1..9 1..9 L(k) L(k) [i,[i, i+1, i+1, i+2] i+2] print(f:‘{k}x{j}={k*j:2}’, print(f:‘{k}x{j}={k*j:2}’, end' end' "\t") "\t") print(end' "\n") print(end' "\n") print() print()
  115. Code to Code Koka Nim //// koka koka -v0 -v0

    -e -e mt9x9.kk mt9x9.kk |||| //// koka koka mt9x9.kk mt9x9.kk -o -o mt9x9 mt9x9 && && ./mt9x9 ./mt9x9 ## nim nim compile compile mt9x9.nim mt9x9.nim && && ./mt9x9 ./mt9x9 module module mt9x9 mt9x9 pub pub fun fun main() main() var i := var i := 11 while{i while{i << 10} 10} list(1, list(1, 9).map 9).map fn(j) fn(j) [i,[i, i+1, i+2].foreach i+1, i+2].foreach fn(k) fn(k) print(k.show ++ "x" print(k.show ++ "x" ++ ++ j.show j.show ++ ++ "=") "=") ifif k*j k*j << 10 10 then then print(" print(" ")") print((k*j).show print((k*j).show ++ ++ "\t") "\t") print("\n") print("\n") println("") println("") ii := := i+3 i+3 import import strformat strformat for for ii inin countup(1, countup(1, 9,9, 3): 3): for for jj inin 1..9: 1..9: for k for k inin [i,[i, i+1, i+1, i+2]: i+2]: write(stdout, write(stdout, k,k, 'x', 'x', j,j, '=', '=', &"{k*j:2d}", &"{k*j:2d}", '\t') '\t') writeLine(stdout, writeLine(stdout, "") "") echo() echo()
  116. Code to Code XL Lobster //// xlxl -B -B mt9x9.xl

    mt9x9.xl //// lobster lobster mt9x9.lobster mt9x9.lobster ii := := 11 while while ii <= <= 99 loop loop jj := 1 := 1 while while jj <= <= 99 loop loop kk := i := i while while kk <= <= i+2 i+2 loop loop write k, "x", j, write k, "x", j, "=" "=" ifif k*j k*j << 10 10 then then write write "" "" write k*j, " ⇥ " write k*j, "⇥" kk := := kk ++ 11 print print jj := := jj ++ 11 print print ii := := ii ++ 33 for([1, for([1, 4,4, 7]) 7]) i:i: for(9) for(9) J:J: let let jj == JJ ++ 11 var var ss == """" for([i, for([i, i+1, i+1, i+2]) i+2]) k:k: ss += += "{k}x{j}={if "{k}x{j}={if k*j<10: k*j<10: "" "" else: else: ""}{k*j}\t" ""}{k*j}\t" print s print s print print """"
  117. Code to Code SQL Zoem \:\: zoem zoem -i-i mt9x9

    mt9x9 ----sqlite3 sqlite3<<mt9x9.sql mt9x9.sql \set{i}{1} \set{i}{1} \while{\let{\i \while{\let{\i <= <= 9}}{ 9}}{ \set{j}{1} \set{j}{1} \while{\let{\j \while{\let{\j <= <= 9}}{ 9}}{ \set{k}{\i} \set{k}{\i} \set{K}{0} \set{K}{0} \while{\let{\K \while{\let{\K <= <= 2}}{ 2}}{ \setx{k}{\let{\i \setx{k}{\let{\i ++ \K}} \K}} \write{-}{txt}{\k\,x\j\,=} \write{-}{txt}{\k\,x\j\,=} \set{s}{\let{\k \set{s}{\let{\k ** \j}} \j}} \if{\let{\s \if{\let{\s << 10}}{\write{-}{txt}{ 10}}{\write{-}{txt}{ }}{} }}{} \write{-}{txt}{\s } \write{-}{txt}{\s } \setx{K}{\let{\K \setx{K}{\let{\K ++ 1}} 1}} }} \write{-}{txt}{\|} \write{-}{txt}{\|} \setx{j}{\let{\j \setx{j}{\let{\j ++ 1}} 1}} }} \write{-}{txt}{\|} \write{-}{txt}{\|} \setx{i}{\let{\i \setx{i}{\let{\i ++ 3}} 3}} }} .mode .modetabs tabs CREATE CREATETABLE TABLEt(jt(jINT, INT,i iINT); INT); WITH RECURSIVE WITH RECURSIVE for(j) for(j)AS AS(VALUES(1) (VALUES(1)UNION UNIONALL ALLSELECT SELECTj+1 j+1FROM FROMfor forWHERE WHEREj j<<9)9) INSERT INSERTINTO INTOttSELECT SELECTj,j,11FROM FROMfor; for; SELECT SELECTi||'x'||j||'='||SUBSTR(' i||'x'||j||'='||SUBSTR(''||(i*j),-2,2), '||(i*j),-2,2), (i+1)||'x'||j||'='||SUBSTR(' (i+1)||'x'||j||'='||SUBSTR(''||((i+1)*j),-2,2), '||((i+1)*j),-2,2), (i+2)||'x'||j||'='||SUBSTR(' '||((i+2)*j),-2,2) (i+2)||'x'||j||'='||SUBSTR(' '||((i+2)*j),-2,2)FROM FROMt;t; SELECT SELECT'';''; UPDATE UPDATEttSET SETi i==i i++3;3; SELECT SELECTi||'x'||j||'='||SUBSTR(' i||'x'||j||'='||SUBSTR(''||(i*j),-2,2), '||(i*j),-2,2), (i+1)||'x'||j||'='||SUBSTR(' '||((i+1)*j),-2,2), (i+1)||'x'||j||'='||SUBSTR(' '||((i+1)*j),-2,2), (i+2)||'x'||j||'='||SUBSTR(' (i+2)||'x'||j||'='||SUBSTR(''||((i+2)*j),-2,2) '||((i+2)*j),-2,2)FROM FROMt;t; SELECT SELECT'';''; UPDATE UPDATEttSET SETi i==i i++3;3; SELECT SELECTi||'x'||j||'='||SUBSTR(' i||'x'||j||'='||SUBSTR(''||(i*j),-2,2), '||(i*j),-2,2), (i+1)||'x'||j||'='||SUBSTR(' (i+1)||'x'||j||'='||SUBSTR(''||((i+1)*j),-2,2), '||((i+1)*j),-2,2), (i+2)||'x'||j||'='||SUBSTR(' (i+2)||'x'||j||'='||SUBSTR(''||((i+2)*j),-2,2) '||((i+2)*j),-2,2)FROM FROMt;t; SELECT SELECT'';'';
  118. Code to Code COBOL BLooP *> *>cobc cobc-Fx -Fxmt9x9.cob mt9x9.cob&&

    &&./mt9x9 ./mt9x9||||cobc cobc-Fxj -Fxjmt9x9.cob mt9x9.cob bloop bloopmt9x9.bloop mt9x9.bloop<<< <<<'MT9X9[].' 'MT9X9[].' identification identificationdivision. division. program-id. program-id.mt9x9. mt9x9. data datadivision. division. working-storage working-storagesection. section. 01 01iipic pic9.9. 01 01jjpic pic9.9. 01 k 01 kpic pic9.9. 01 l pic 01 l pic9.9. 01 01kjkjpic picz9. z9. procedure proceduredivision. division. perform varying perform varyingiifrom from00by by33until untiliigreater greaterthan than88 perform with test after varying j from 1 by perform with test after varying j from 1 by11until untiljjequal equal99 perform varying l from 1 by 1 until l greater than perform varying l from 1 by 1 until l greater than33 add addiillgiving givingkk multiply multiplykkby byjjgiving givingkjkj display k "x" j "=" display k "x" j "="kjkjx"09" x"09"with withno noadvancing advancing end-perform end-perform display displayx"0a" x"0a"with withno noadvancing advancing end-perform end-perform display displayx"00" x"00" end-perform end-perform stop stoprun. run. DEFINE DEFINEPROCEDURE PROCEDURE''MT9X9'' ''MT9X9''[N]: [N]: BLOCK 0: BEGIN BLOCK 0: BEGIN CELL(0) CELL(0)<= <=1;1; LOOP LOOP33TIMES: TIMES: BLOCK BLOCK1:1:BEGIN BEGIN CELL(1) CELL(1)<= <=1;1; LOOP 9 TIMES: LOOP 9 TIMES: BLOCK BLOCK2:2:BEGIN BEGIN CELL(2) CELL(2)<= <=CELL(0); CELL(0); LOOP LOOP33TIMES: TIMES: BLOCK BLOCK3:3:BEGIN BEGIN PRINT PRINT[CELL(2), [CELL(2),'x', 'x',CELL(1), CELL(1),'=']; '=']; IF CELL(2) * CELL(1) IF CELL(2) * CELL(1)<<10, 10,THEN: THEN: PRINT PRINT['[''];']; PRINT PRINT[CELL(2) [CELL(2)**CELL(1), CELL(1),'⇥ '⇥'];']; CELL(2) <= CELL(2) + 1; CELL(2) <= CELL(2) + 1; BLOCK BLOCK3:3:END; END; PRINT PRINT['[' '];']; CELL(1) CELL(1)<= <=CELL(1) CELL(1)++1;1; BLOCK BLOCK2:2:END; END; PRINT PRINT['[' '];']; CELL(0) CELL(0)<= <=CELL(0) CELL(0)++3;3; BLOCK BLOCK1:1:END; END; BLOCK BLOCK0:0:END. END.
  119. Code to Code Assembly(Intel) ;;nasm nasm-f-felf64 elf64mt9x9.asm mt9x9.asm&& && ;;ldldmt9x9.o

    mt9x9.o-o-omt9x9 mt9x9&& &&./mt9x9 ./mt9x9 GLOBAL GLOBAL _start _start SECTION SECTION .data .data i:i: DB DB 00 j:j: DB DB 00 k:k: DB DB 00 ten: ten: DB DB 10 10 item: item: DB DB '9x9=81', '9x9=81',99 nl: DB 10 nl: DB 10 SECTION SECTION.text .text _start: _start: MOV MOV BYTE[i], BYTE[i],11 loop_i: loop_i: MOV MOV BYTE[j], BYTE[j],11 loop_j: loop_j: MOV MOV BYTE[k], BYTE[k],00 loop_k: loop_k: MOV MOV AL, AL,[k] [k] ADD ADD AL, AL,[i][i] ADD ADD AL, AL,48 48 MOV MOV BYTE[item], BYTE[item],AL AL MOV MOV AL, AL,[j][j] ADD ADD AL, AL,48 48 MOV MOV BYTE[item+2], BYTE[item+2],AL AL MOV AL, [k] MOV AL, [k] ADD AL, [i] ADD AL, [i] MUL MUL BYTE[j] BYTE[j] CMP CMP AL, AL,[ten] [ten] JB JB if_then if_then DIV DIV BYTE[ten] BYTE[ten] ADD ADD AL, AL,48 48 MOV MOV BYTE[item+4], BYTE[item+4],AL AL ADD AH, 48 ADD AH, 48 MOV BYTE[item+5], AH MOV BYTE[item+5], AH JMP JMP if_end if_end if_then: if_then: ADD ADD AL, AL,48 48 MOV MOV BYTE[item+4], BYTE[item+4],' '' ' MOV BYTE[item+5], MOV BYTE[item+5],AL AL if_end: if_end: MOV MOV RAX, RAX,11 MOV MOV RDI, RDI,11 MOV MOV RSI, RSI,item item MOV MOV RDX, RDX,77 SYSCALL SYSCALL INC INC BYTE[k] BYTE[k] CMP CMP BYTE[k], BYTE[k],22 JBE loop_k JBE loop_k CALL CALL newline newline INC INC BYTE[j] BYTE[j] CMP CMP BYTE[j], BYTE[j],99 JBE JBE loop_j loop_j CALL CALL newline newline ADD ADD BYTE[i], BYTE[i],33 CMP BYTE[i], CMP BYTE[i],99 JBE JBE loop_i loop_i MOV MOV RAX, RAX,60 60 XOR XOR RDI, RDI,RDI RDI SYSCALL SYSCALL newline: newline: MOV MOV RAX, RAX,11 MOV MOV RDI, RDI,11 MOV MOV RSI, RSI,nlnl MOV MOV RDX, RDX,11 SYSCALL SYSCALL RET RET Assembly(AT&T) ##as asmt9x9.s mt9x9.s-o-omt9x9.o mt9x9.o&& && ##ldldmt9x9.o mt9x9.o-o-omt9x9 mt9x9&& &&./mt9x9 ./mt9x9 .global _start .global _start .data .data i:i: .byte .byte 00 j:j: .byte .byte 00 k:k: .byte .byte 00 ten: ten: .byte .byte 10 10 item: item: .ascii .ascii "9x9=81\t" "9x9=81\t" nl: .ascii "\n" nl: .ascii "\n" .text .text _start: _start: movb movb $1, $1,i i loop_i: loop_i: movb movb $1, $1,j j loop_j: loop_j: movb movb $0, $0,kk loop_k: loop_k: movb movb k,k,%al %al addb addb i,i,%al %al addb addb $48, $48,%al %al movb movb %al, %al,item item movb movb j,j,%al %al addb addb $48, $48,%al %al movb movb %al, %al,item+2 item+2 movb k, %al movb k, %al addb i, %al addb i, %al mulb mulb j j cmpb cmpb ten, ten,%al %al jbjb if_then if_then divb divb ten ten addb addb $48, $48,%al %al movb movb %al, %al,item+4 item+4 addb $48, %ah addb $48, %ah movb %ah, movb %ah,item+5 item+5 jmp jmp if_end if_end if_then: if_then: addb addb $48, $48,%al %al movb movb $32, $32,item+4 item+4 movb %al, item+5 movb %al, item+5 if_end: if_end: mov mov $1, $1,%rax %rax mov mov $1, $1,%rdi %rdi mov mov $item, $item,%rsi %rsi mov mov $7, $7,%rdx %rdx syscall syscall incb incb kk cmpb cmpb $2, $2,kk jbe jbe loop_k loop_k call call newline newline incb incb j j cmpb cmpb $9, $9,j j jbe jbe loop_j loop_j call call newline newline addb addb $3, $3,i i cmpb cmpb $9, $9,i i jbe jbe loop_i loop_i mov mov $60, $60,%rax %rax xor xor %rdi, %rdi,%rdi %rdi syscall syscall newline: newline: mov mov $1, $1,%rax %rax mov mov $1, $1,%rdi %rdi mov $nl, %rsi mov $nl, %rsi mov $1, %rdx mov $1, %rdx syscall syscall ret ret
  120. Code to Code BF Assembler ; ;bfa mt9x9.bfa bfamt9x9.bf mt9x9.bfamt9x9.bf

    mt9x9.bf ; ;bfi bfi mt9x9.bf SET SET120 120 MVR MVR61 SET SET 61 MVR MVR9 SET SET 9 MVR MVR10 SET SET 10 MVR MVR9 SET SET 9 LOB LOB CPR CPR222 MVR MVR2 2 CPL CPL 2 MVR MVR9 SET SET 9 LOB LOB CPR CPR222 MVR MVR2 2 CPL CPL58 2 SET SET 58 MVR MVR SET SET10 10 MVL MVL22 LOB LOB MVR MVR SUB SUB MVR MVR SUB SUB2 MVL MVL 2 SUB SUB LOE LOE MVR 4 MVR SET 334 SET LOB LOB CPR CPR222 MVR MVR2 2 CPL CPL13 2 SET SET913 MVL MVL 9 LOB LOB MVR MVR ADD ADD8 MVR MVR 8 SUB SUB9 MVL MVL 9 SUB SUB LOE LOE MVR MVR1 CPL CPL 71 MVR MVR 7 LOB LOB MVR MVR SUB SUB MVL MVL SUB SUB LOE LOE MVR MVR CPR CPR222 MVR MVR2 2 CPL CPL48 2 SET SET 48 MVL MVL LOB LOB MVR MVR ADD ADD MVL MVL SUB SUB LOE LOE MVR 22 MVR SET SET MVL MVL77 LOB LOB MVR MVR ADD ADD3 MVR MVR 3 LOB LOB MVR MVR ADD ADD2 MVR MVR 2 ADD ADD3 MVL MVL 3 SUB SUB LOE LOE MVR MVR CPL CPL151 MVL MVL 5 SUB SUB LOE LOE MVR MVR CPL CPL171 MVR MVR 7 SET SET MVR MVR32 SET SET 32 MVR MVR48 SET SET 248 MVR MVR 2 SET SET10 10 MVL MVL55 LOB LOB MVR MVR33 ADD ADD MVR MVR1 SET SET 1 MVR MVR SUB SUB2 CPR CPR22 MVR MVR2 2 CPL CPL 2 MVL MVL LOB LOB MVL MVL22 SUB SUB2 MVR MVR 2 SET SET LOE LOE MVL 22 MVL LOB LOB MVL MVL22 ADD ADD MVL MVL ADD ADD2 MVR MVR482 SET SET 248 MVR MVR102 SET SET 10 MVL MVL SUB SUB LOE LOE MVL 44 MVL SUB SUB LOE LOE MVR MVR LOB LOB MVR MVR16 ADD ADD 16 MVL MVL SET SET LOE LOE MVL 22 MVL PUT PUT16 MVL MVL 16 PUT PUT 9 MVR MVR 9 PUT PUT8 MVL MVL 8 PUT PUT MVR MVR18 18 PUT PUT MVR MVR PUT PUT18 MVL MVL 18 PUT PUT 10 MVR MVR 10 SUB SUB LOE LOE MVL 99 MVL PUT PUT 4 MVR MVR 4 SUB SUB LOE LOE MVL 44 MVL PUT PUT MVR MVR3 SUB SUB 3 LOE LOE Brainfuck #!/usr/bin/bfi #!/usr/bin/bfi [ [./mt9x9.bf ./mt9x9.bf||||bfi bfimt9x9.bf mt9x9.bf] ] [-]>++++++++++[<++++++++++++>-]<>>[-]>++++++[<++++++++++>-]<+>>[ [-]>++++++++++[<++++++++++++>-]<>>[-]>++++++[<++++++++++>-]<+>>[ -]+++++++++>>[-]++++++++++>>[-]+++++++++[>>[-]>>[-]<<<<[>>+>>+<< -]+++++++++>>[-]++++++++++>>[-]+++++++++[>>[-]>>[-]<<<<[>>+>>+<< <<-]>>>><<[-]<<[-]>>>>[<<+<<+>>>>-]>>[-]+++++++++[>>[-]>>[-]<<<< <<-]>>>><<[-]<<[-]>>>>[<<+<<+>>>>-]>>[-]+++++++++[>>[-]>>[-]<<<< [>>+>>+<<<<-]>>>><<[-]<<[-]>>>>[<<+<<+>>>>-][-]>+++++++[<+++++++ [>>+>>+<<<<-]>>>><<[-]<<[-]>>>>[<<+<<+>>>>-][-]>+++++++[<+++++++ +>-]<++>>[-]++++++++++<<<<[>>->>-<<<<-]>>>>>>>>[-]+++[>>[-]>>[-] +>-]<++>>[-]++++++++++<<<<[>>->>-<<<<-]>>>>>>>>[-]+++[>>[-]>>[-] <<<<[>>+>>+<<<<-]>>>><<[-]<<[-]>>>>[<<+<<+>>>>-][-]+++++++++++++ <<<<[>>+>>+<<<<-]>>>><<[-]<<[-]>>>>[<<+<<+>>>>-][-]+++++++++++++ <<<<<<<<<<<<<<<<<<[>>+>>>>>>>>>>>>>>>>-<<<<<<<<<<<<<<<<<<-]>><<[ <<<<<<<<<<<<<<<<<<[>>+>>>>>>>>>>>>>>>>-<<<<<<<<<<<<<<<<<<-]>><<[ -]>>[<<+>>-]>>>>>>>>>>>>>>[>>-<<-]>>>>[-]>>[-]<<<<[>>+>>+<<<<-]> -]>>[<<+>>-]>>>>>>>>>>>>>>[>>-<<-]>>>>[-]>>[-]<<<<[>>+>>+<<<<-]> >>><<[-]<<[-]>>>>[<<+<<+>>>>-][-]>++++++[<++++++++>-]<<<[>>+<<-] >>><<[-]<<[-]>>>>[<<+<<+>>>>-][-]>++++++[<++++++++>-]<<<[>>+<<-] >>>>[-]<<<<<<<<<<<<<<[>>+>>>>>>[>>+>>>>+<<<<<<-]>><<[-]>>[<<+>>>>>>[-]<<<<<<<<<<<<<<[>>+>>>>>>[>>+>>>>+<<<<<<-]>><<[-]>>[<<+>>]<<<<<<<<<<-]>><<[-]>>[<<+>>-]>>>>>>>>>>>>>>[-]>>[-]>++++[<+++++ ]<<<<<<<<<<-]>><<[-]>>[<<+>>-]>>>>>>>>>>>>>>[-]>>[-]>++++[<+++++ +++>-]<>>[-]>++++++[<++++++++>-]<>>>>[-]++++++++++<<<<<<<<<<[>>> +++>-]<>>[-]>++++++[<++++++++>-]<>>>>[-]++++++++++<<<<<<<<<<[>>> >>>+>>[-]+>>->>[-]>>[-]<<<<[>>+>>+<<<<-]>>>><<[-]<<[-]>>>>[<<+<< >>>+>>[-]+>>->>[-]>>[-]<<<<[>>+>>+<<<<-]>>>><<[-]<<[-]>>>>[<<+<< +>>>>-]<<[<<<<->>>>[-]]<<<<[<<<<+<<+>>>>[-]>++++++[<++++++++>-]< +>>>>-]<<[<<<<->>>>[-]]<<<<[<<<<+<<+>>>>[-]>++++++[<++++++++>-]< >>>>[-]++++++++++<<-]<<<<<<<<-]>>[>>>++++[<++++>-]<<<[-]]<<<<.<< >>>>[-]++++++++++<<-]<<<<<<<<-]>>[>>>++++[<++++>-]<<<[-]]<<<<.<< <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<.>>>>>>>>>>>>>>>>>>.<<<<<<<<<<<<<< <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<.>>>>>>>>>>>>>>>>>>.<<<<<<<<<<<<<< <<.>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.>>.<<<<<<<<<<<<<<<<<<<<< <<.>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.>>.<<<<<<<<<<<<<<<<<<<<< <<<<<<<<<<<<<<<.>>>>>>>>>>>>>>>>>>>>-]<<<<<<<<<<<<<<<<<<.>>>>>>> <<<<<<<<<<<<<<<.>>>>>>>>>>>>>>>>>>>>-]<<<<<<<<<<<<<<<<<<.>>>>>>> >-]<<<<<<<<.>>---] >-]<<<<<<<<.>>---]
  121. Code to Code Cantonese /*/*cantonese cantonesemt9x9.cantonese mt9x9.cantonese*/*/ | |甲 甲|

    | 從 從 00 行到 行到 33 | |乙 | 從 1 乙 | 從 1 行到 行到 10 10 講嘢 講嘢::| |列 列| | 係 係 """" | |丙 丙| | 從 從 | |甲 甲乘 乘 33 加 加 1|1| 行到 行到 | |甲 甲乘 乘 33 加 加 4|4| 講嘢 : | 列 | 係 | 列 加 str( 丙 ) 加 "x" 加 講嘢 : | 列 | 係 | 列 加 str( 丙 ) 加 "x" 加 str( str(乙 乙)) 加 加 "="| "="| 如果 | 丙 乘 乙 比唔上 10| 嘅話 -> { 如果 | 丙 乘 乙 比唔上 10| 嘅話 -> { 講嘢 講嘢::| |列 列| | 係 係 | |列 列加 加 """|"| }} 講嘢 講嘢::| |列 列| | 係 係 | |列 列加 加 str( str(丙 丙乘 乘乙 乙)) 加 加 "\t"| "\t"| 行晒 行晒 畀我睇下 畀我睇下 | |列 列| | 點樣先? 點樣先? 行晒 行晒 畀我睇下 畀我睇下 """" 點樣先? 點樣先? 行晒 行晒 Wenyan 批曰。『 批曰。『wenyan wenyanmt9x9.wy mt9x9.wy』。 』。 有數一名之曰「甲」。 有數一名之曰「甲」。 恆為是。若「甲」不小於十者乃止也。 恆為是。若「甲」不小於十者乃止也。 有數一名之曰「乙」。 有數一名之曰「乙」。 恆為是。若「乙」不小於十者乃止也。 恆為是。若「乙」不小於十者乃止也。 有數「甲」名之曰「丙」。 有數「甲」名之曰「丙」。 吾有一言。名之曰「列」。 吾有一言。名之曰「列」。 恆為是。若「丙」不小於「甲」加三者乃止也。 恆為是。若「丙」不小於「甲」加三者乃止也。 乘「丙」以「乙」名之曰「果」。 乘「丙」以「乙」名之曰「果」。 加「列」以「丙」。昔之「列」者今其是矣。 加「列」以「丙」。昔之「列」者今其是矣。 加「列」以『 加「列」以『xx』。昔之「列」者今其是矣。 』。昔之「列」者今其是矣。 加「列」以「乙」。昔之「列」者今其是矣。 加「列」以「乙」。昔之「列」者今其是矣。 加「列」以『 加「列」以『==』。昔之「列」者今其是矣。 』。昔之「列」者今其是矣。 若「果」小於十者 若「果」小於十者 加「列」以『 加「列」以『』。昔之「列」者今其是矣也。 』。昔之「列」者今其是矣也。 加「列」以「果」。昔之「列」者今其是矣。 加「列」以「果」。昔之「列」者今其是矣。 加「列」以『 加「列」以『\t\t』。昔之「列」者今其是矣。 』。昔之「列」者今其是矣。 加「丙」以一。昔之「丙」者今其是矣。 加「丙」以一。昔之「丙」者今其是矣。 云云。 云云。 吾有一言。曰「列」。書之。 吾有一言。曰「列」。書之。 加「乙」以一。昔之「乙」者今其是矣。 加「乙」以一。昔之「乙」者今其是矣。 云云。 云云。 書之。 書之。 加「甲」以三。昔之「甲」者今其是矣。 加「甲」以三。昔之「甲」者今其是矣。 云云。 云云。
  122. Code to Code LOLCODE Emojicode BTW BTWlci lcimt9x9.lol mt9x9.lol 💭

    💭 emojicodec emojicodec mt9x9.emojic mt9x9.emojic && && ./mt9x9 ./mt9x9 HAI HAI1.3 1.3 IIHAS HASAAiiITZ ITZ11 IM IN YR loop IM IN YR loopUPPIN UPPINYR YRiiiiWILE WILEDIFFRINT DIFFRINTiiAN AN10 10 IM IN YR loop UPPIN YR jj TIL BOTH SAEM jj AN IM IN YR loop UPPIN YR jj TIL BOTH SAEM jj AN99 IIHAS HASAAjjITZ ITZSUM SUMOF OFjjjjAN AN11 IM IMIN INYR YRloop loopUPPIN UPPINYR YRkk kkTIL TILBOTH BOTHSAEM SAEMkk kkAN AN33 IIHAS A k ITZ SUM OF i AN kk HAS A k ITZ SUM OF i AN kk VISIBLE VISIBLEkk"x" "x"jj"=" "="!! IIHAS HASAAssITZ ITZPRODUKT PRODUKTOF OFkkAN ANjj DIFFRINT s AN BIGGR OF s AN DIFFRINT s AN BIGGR OF s AN10, 10,OORLY? RLY? YA YARLY, RLY,VISIBLE VISIBLE""""!! OIC OIC VISIBLE VISIBLEss":>" ":>"!! IM OUTTA YR IM OUTTA YRloop loop VISIBLE ":)" ! VISIBLE ":)" ! IM IMOUTTA OUTTAYR YRloop loop VISIBLE "" VISIBLE "" iiRRSUM SUMOF OFiiAN AN33 IM IMOUTTA OUTTAYR YRloop loop KTHXBYE KTHXBYE 🏁🍇 🏁🍇 🔂 🔂 ii 🆕⏩ 🆕⏩ 11 10 10 33❗️🍇 ❗️🍇 🔂 j 🆕⏩ 1 10 🔂 j 🆕⏩ 1 10❗️🍇 ❗️🍇 ii ➡️ 🖍🆕 k ➡️ 🖍🆕 k 🔁 🔁 kk ◀️🙌 ◀️🙌 i➕ i➕22🍇 🍇 👄 👄 🔤🧲 🔤🧲kk🧲 🧲xx🧲 🧲j🧲 j🧲==🔤❗️ 🔤❗️ ↪️ ↪️ kk✖️ ✖️jj ◀️ ◀️ 10 10🍇 🍇 👄 👄🔤 🔤 🔤❗️ 🔤❗️ 🍉 🍉 👄 👄 🔤🧲 🔤🧲kk✖️ ✖️j🧲❌ j🧲❌tt🔤❗️ 🔤❗️ kk ⬅️➕ 1 ⬅️➕ 1 🍉 🍉 👄 👄 🔤❌ 🔤❌nn🔤❗️ 🔤❗️ 🍉 🍉 😀 😀 🔤🔤❗️ 🔤🔤❗️ 🍉 🍉 🍉 🍉
  123. Reference Rosetta Code <https://www.rosettacode.org/wiki/Multiplication_tables> Learn X in Y minutes <https://learnxinyminutes.com/>

    Fibonacci Benchmark <https://github.com/drujensen/fib> 99 Bottles of Beer <https://www.99-bottles-of-beer.net/>