-
Notifications
You must be signed in to change notification settings - Fork 0
/
big-input.txt
94 lines (79 loc) · 1.48 KB
/
big-input.txt
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
struct {
int integer;
char character;
} pair;
struct {
struct { int age; } [2] employees;
} [2] acme;
int[8][3] fibonacci;
//-------------------------------
void p() {}
int f(double r, int e) {
double real;
char c;
int result;
real = r * 10.0;
c='0';
if (e < 256) {
c = (char)e;
result = (int)c;
}
else
result = (int)real;
return result;
}
void initialize() {
int i;
fibonacci[0][0] = 0;
fibonacci[0][1] = 1;
fibonacci[0][2] = 1;
i = 1;
while(i < 8) {
fibonacci[i][0] = fibonacci[i - 1][1];
fibonacci[i][1] = fibonacci[i - 1][2];
fibonacci[i][2] = fibonacci[i][0] + fibonacci[i][1];
i = i + 1;
}
}
//-------------------------------
void main(){
int i, j;
p();
i=0;
pair.character='0';
pair.integer=(int)'0';
// * Shows 48 (decimal value of '0')
write f((double)i, (int)(pair.character)), '\n';
f(1.3, 2);
initialize();
i = 0;
while(i < 8) {
// Shows the Fib sequence, from 1 to 8 (34)
write '(', i + 1, ')', fibonacci[i][0],
'+', fibonacci[i][1] , '=' ,
fibonacci[i][2] , '\n';
i = i + 1;
}
acme[1].employees[1].age = 56;
// Shows 56
write acme[1].employees[1].age, '\n';
i = 0;
while (i<2) {
j = 0;
while (j<2) {
acme[i].employees[j].age = i + j;
j = j+ 1;
}
i= i + 1;
}
i = 0;
while (i<2) {
j = 0;
while (j<2) {
// Shows 0 1 1 2
write acme[i].employees[j].age, ' ';
j = j+ 1;
}
i= i + 1;
}
}