source:
CIVL/mods/dev.civl.com/examples/backend/binaryGuard.cvl@
cb4d4f4
| Last change on this file since cb4d4f4 was aad342c, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 260 bytes | |
| Line | |
|---|---|
| 1 | $input int x, y, z, d; |
| 2 | |
| 3 | int main(){ |
| 4 | int a=0; |
| 5 | |
| 6 | $choose{ |
| 7 | $when(d>100) |
| 8 | if(x<y) |
| 9 | a=0; |
| 10 | else |
| 11 | a=1; |
| 12 | if(y>z) |
| 13 | a=2; |
| 14 | else |
| 15 | if(z>50) |
| 16 | a=3; |
| 17 | else |
| 18 | a=5; |
| 19 | $when(d<4) |
| 20 | for(int i=0; i<3; i++) |
| 21 | a+=i; |
| 22 | default: |
| 23 | a=4; |
| 24 | } |
| 25 | } |
Note:
See TracBrowser
for help on using the repository browser.
