-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathBoolTest09.lemon
More file actions
42 lines (36 loc) · 813 Bytes
/
BoolTest09.lemon
File metadata and controls
42 lines (36 loc) · 813 Bytes
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
class BoolTest09{
void main(){
int a;
bool b1;
b1 = rtNum(1) > 0 && rtNum(1) > 20 || true;
if( b1 )
a = 19;
else
a = 20;
printf("a=%d\n",a);// a = 19
b1 = rtNum(1)-100 > 0 && rtNum(1) > 20 || true;
if( b1 )
a = 21;
else
a = 22;
printf("a=%d\n",a);// a = 21
b1 = rtNum(1)-100 > 0 && rtNum(1) > 20 || rtNum(1)/19 > 2;
if( b1 )
a = 23;
else
a = 24;
printf("a=%d\n",a);// a = 24
b1 = cal(1.0);
if( b1 )
a = 25;
else
a = 26;
printf("a=%d\n",a);// a = 25
}
int rtNum(int i){
return 19 * i;
}
bool cal(float a){
return a > 10.0 && rtNum(2) > 38 || true;
}
}