diff options
Diffstat (limited to 'tests/exec/while.cpp')
-rw-r--r-- | tests/exec/while.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/exec/while.cpp b/tests/exec/while.cpp new file mode 100644 index 0000000..d69002b --- /dev/null +++ b/tests/exec/while.cpp @@ -0,0 +1,17 @@ +#include <iostream> + +int main() { + int i = 0; + int cpt = 0; + for( ; i < 10; ) { + int j; + j = 10; + for ( ; j > 0; ) { + ++cpt; + --j; + } + i++; + } + if (cpt == 100) + std::cout << "ok\n"; +} |