loom
1// Циклы
2
3string s;
4
5int i = 0;
6while(++i < 10)
7s += i*2 + " ";
8
9sys.print(s);
10
11s = "";
12i = 0;
13
14while(true)
15{
16if (i > 10)
17break;
18
19s += i*3 + " ";
20
21i++;
22}
23
24sys.print(s);
25sys.print(i);
26
27s = "";
28i = 0;
29
30do
31{
32i++;
33
34if (i > 5)
35continue;
36
37s += i*3 + " ";
38}
39while(i < 10);
40
41sys.print(s);
42sys.print(i);
43
44s = "";
45
46for(int i=0; i < 6; ++i)
47s += i*3 + " ";
48
49sys.print(s);
50sys.print(i);
51
52
53s = "";
54i = 0;
55
56for(;;)
57{
58if (i > 10)
59break;
60
61s += i*3 + " ";
62
63i++;
64}
65
66sys.print(s);
67sys.print(i);
68
69
70