forked from zenware/FizzBuzz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzinc.zn
35 lines (27 loc) · 947 Bytes
/
zinc.zn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//! zinc
library FizzBuzz { private { /* Fizz buzz in Zinc
*************************************************************************************
*
* http://www.wc3c.net/vexorian/zincmanual.html
*
************************************************************************************/
struct Main[] { private { static method onInit() {
integer Index = 1;
PreloadGenClear();
PreloadGenStart();
while(Index <= 100) {
if( ModuloInteger(Index, 15) == 0 ) {
Preload("\t\tFizz Buzz\t");
} else if( ModuloInteger(Index, 5) == 0 ) {
Preload("\t\tBuzz\t\t");
} else if( ModuloInteger(Index, 3) == 0 ) {
Preload("\t\tFizz\t\t");
} else {
Preload("\t\t" + I2S(Index) + "\t\t");
}
Index = Index + 1;
}
PreloadGenEnd("FizzBuzz\\Output.txt");
}}}
}}
//! endzinc