-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmyCprog.c
68 lines (57 loc) · 1.02 KB
/
myCprog.c
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
#include "P_header.h"
int main()
{
// test @int
@int A (10)
@int A_2 (10)
@int A_3 (10)
@int B (5)
@int C_test (100)
@int D_array (8)
@int E (5,5)
@int F (20, 20)
@int G_test (30, 30)
@int G_test2 (30, 30)
@int G_test3 (30, 30)
@int H_array (15, 125)
// test @read
@read A < f1_nums
// test @copy
@copy A = A_2
@copy G_test = G_test2
// test @init
@init A = 2
if (1 == 1) {
@init E = 5
} else {
if (1 != 2) {
@init C_test = 10
}
}
@init H_array = 1000
// test @print
@print A
@print E
@print C_test
@print H_array
// test @dotp
@dotp A = A_2 . A_3
// test @add
@add G_test = G_test2 * G_test3
// test @mmult
@mmult G_test = G_test2 * G_test3
// test @sum
@sum A
@sum E
@sum C_test
@sum H_array
// test @aver
@aver A
@aver E
@aver C_test
@aver H_array
// test undefined oper
@undef
@what
return 0;
}