-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmp.txt
117 lines (103 loc) · 1.01 KB
/
tmp.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
int y;
int f(int x){
if(x==1)
return 1;
else{
y=f(x-1);
return x*y;
}
}
int sum(){
int i;
int sum;
i=sum=0;
while(1){
i=i+1;
if(i>=101)
break;
sum=sum+i;
}
return sum;
}
int max(int a,int b){
if(a>=b)
return a;
else
return b;
}
double avg(int a,int b){
return (a+b)/2;
}
void g(int a[]){
a[1,2,3]=100;
output(a[2,3,4]);
return;
}
int array[3,4,5];
begin
int i;
int j;
int k;
i=j=0;
while(1){
j=0;
while(1){
j=j+1;
if(j>=2)
break;
}
i=i+1;
if(i>=2)
break;
}
i=j=4;
g(array);
output(i,j);
end
int a;
int b;
int f(int x){
if(x==1)
return 1;
else{
return x*f(x-1);
}
}
int sum(){
int i;
int sum;
i=sum=0;
while(1){
i=i+1;
if(i>=101)
break;
sum=sum+i;
}
return sum;
}
int max(int a,int b){
if(a>=b)
return a;
else
return b;
}
double avg(int a,int b){
return (a+b)/2;
}
int h(int k){
int x;
int y;
if(k==1)
return 1;
else if(k==2)
return 1;
else
return h(k-1)+h(k-2);
}
void g(){
return;
}
begin
a=100;
output(h(13));
end