More actions
imported>Unknown No edit summary |
(Repair batch-0004 pages from live compare) |
||
| Line 30: | Line 30: | ||
a := 2. | a := 2. | ||
b := 1. | b := 1. | ||
8 timesRepeat: | 8 timesRepeat: [ | ||
9 timesRepeat: | 9 timesRepeat: [Transcript show: a;show:'*';show:b;show:'='; show: a * b; cr. b := b + 1.]. | ||
a:= a+1. | a:= a+1. | ||
b:= 1. | b:= 1.]. | ||
| Line 40: | Line 40: | ||
---- | ---- | ||
[[구구단]] [aekae] | [[구구단]] [aekae] | ||
Latest revision as of 00:37, 27 March 2026
C++
#include <iostream>
using namespace std;
int main()
{
for (int i=1; i<10; i++)
{
for (int j=2; j<6; j++)
cout << j << " * " << i << " = " << j*i << "\t";
cout << "\n";
}
cout << "\n";
for (int k=1; k<10; k++)
{
for (int h=6; h<10; h++)
cout << h << " * " << k << " = " << h*k << "\t";
cout << "\n";
}
return 0;
}
Smalltalk
PrintGugudan | a b | a := 2. b := 1. 8 timesRepeat: [ 9 timesRepeat: [Transcript show: a;show:'*';show:b;show:'='; show: a * b; cr. b := b + 1.]. a:= a+1. b:= 1.]. abc := Gugudan new. abc PrintGugudan.
구구단 [aekae]