main
test-branch
|
Last change
on this file since ba6c728 was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago |
|
Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
652 bytes
|
| Line | |
|---|
| 1 | #include<assert.h>
|
|---|
| 2 |
|
|---|
| 3 | int main() {
|
|---|
| 4 | int i,j,k;
|
|---|
| 5 |
|
|---|
| 6 | k = 0;
|
|---|
| 7 | for (i = 0, j = 0; i < 10; i++, j++) {
|
|---|
| 8 | k += (i + j);
|
|---|
| 9 | continue;
|
|---|
| 10 | }
|
|---|
| 11 | assert(k == 90);
|
|---|
| 12 |
|
|---|
| 13 | for (i = 0, j = 0, k = 0; i < 10; i++, j++) {
|
|---|
| 14 | if ( k >= 45) continue;
|
|---|
| 15 | else
|
|---|
| 16 | k += (i + j);
|
|---|
| 17 | }
|
|---|
| 18 | assert(k == 56);
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 | for (i = 0, j = 0, k = 0; i < 10; i++, j++) {
|
|---|
| 22 | while (1) {
|
|---|
| 23 | k += 1;
|
|---|
| 24 | if (k <= 45 )
|
|---|
| 25 | continue;
|
|---|
| 26 | else
|
|---|
| 27 | break;
|
|---|
| 28 | }
|
|---|
| 29 | continue;
|
|---|
| 30 | }
|
|---|
| 31 | assert(k == 55);
|
|---|
| 32 |
|
|---|
| 33 | for (i = 0, j = 0, k = 0; i < 10; i++, j++) {
|
|---|
| 34 | int x = 0;
|
|---|
| 35 |
|
|---|
| 36 | for (; k < 10; k++, x++)
|
|---|
| 37 | continue;
|
|---|
| 38 | k+= (i + j);
|
|---|
| 39 | if (k > 1000) continue;
|
|---|
| 40 | }
|
|---|
| 41 | assert(k == 100);
|
|---|
| 42 | return 0;
|
|---|
| 43 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.