1 program randcase_statement {
2 // You need to run for more iteration to
3 // get proper distribution
4 repeat(10) {
5 do_randcase();
6 }
7 }
8
9 task do_randcase() {
10 randcase {
11 20 : {
12 printf ("What should I do ? \n");
13 }
14 20 : {
15 printf ("Should I work\n");
16 }
17 20 : {
18 printf ("Should I watch Movie\n");
19 }
20 40 : {
21 printf ("Should I complete tutorial\n");
22 }
23
24 }
25 }
You could download file randcase_statement.vr here
|