-
Notifications
You must be signed in to change notification settings - Fork 0
/
writePerpetualCycle.ts
45 lines (38 loc) · 1.14 KB
/
writePerpetualCycle.ts
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
36
37
38
39
40
41
42
43
44
45
function writePerpetualCycle(c: number){
function writePerpetual(c: number){
document.writeln("<table width=\"0%\" border=\"1\">");
c = c * 100;
document.writeln("<tr>");
document.writeln("<td colspan='11' align='center'>"+(c)+"-"+(c+400)+"-"+(c+800)+"</td>");
document.writeln("</tr>");
document.writeln("<tr>");
document.write("<td> </td>");
for (var i=0;i<10;i++){
document.write("<td align='center'>" + i + "</td>");
}
document.writeln("</tr>");
for (var j=0;j<10;j++){
document.writeln("<tr>");
document.write("<td align ='center'>" + j + "</td>");
let y: number;
for (var i=0;i<10;i++){
y = c+j*10+i;
document.write("<td align ='center'>" + (Computus.dominical(y)) + "</td>");
}
document.writeln("</tr>");
}
document.writeln("</table>");
}
document.writeln("<table>")
document.writeln("<tr><td>");
writePerpetual(c);
document.writeln("</td><td>");
writePerpetual(c+1);
document.writeln("</td></tr>");
document.writeln("<tr><td>");
writePerpetual(c+2);
document.writeln("</td><td>");
writePerpetual(c+3);
document.writeln("</td></tr>");
document.writeln("</table>");
}