-
Notifications
You must be signed in to change notification settings - Fork 0
/
inputP6.txt
55 lines (45 loc) · 925 Bytes
/
inputP6.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
// * Variable and function definitions
int i, j, n;
// * Empty function
void p() {}
char c; // global variable
int f(int n, double r) {
double real;
char c1, c2;
c1 = (char)n;
real = (double)c1 + (double)n + r;
p(); // * Invocation as a statement
return (int)c1;
}
// * Main function
void main() {
// * Record
struct {
int integer;
char character;
} pair;
// * Array
int[10][5] vector;
i=0;
j=0;
while(i<10){
while(j<5) {
vector[i][j] = i + j;
j=j+1;
}
i=i+1;
}
i=0;
pair.character = '0';
pair.integer = 48;
while (pair.integer >= i) {
if (pair.integer == vector[0][0] || !(int)pair.character || i%2==0)
write 't', 'r', 'u', 'e', '\n';
else
write 'f', 'a', 'l', 's', 'e', '\n';
i=i+1;
}
write f(i, (double)i); // * Invocation as an expression
vector[9][(int)4.3]=5;
f(1, 2.2); // * Invocation as a statement
}