aboutsummaryrefslogtreecommitdiff
path: root/rcc-legacy/tests/functional/11_while.sy
diff options
context:
space:
mode:
Diffstat (limited to 'rcc-legacy/tests/functional/11_while.sy')
-rw-r--r--rcc-legacy/tests/functional/11_while.sy11
1 files changed, 11 insertions, 0 deletions
diff --git a/rcc-legacy/tests/functional/11_while.sy b/rcc-legacy/tests/functional/11_while.sy
new file mode 100644
index 0000000..374f82d
--- /dev/null
+++ b/rcc-legacy/tests/functional/11_while.sy
@@ -0,0 +1,11 @@
+int a;
+int b;
+int main(){
+ b=0;
+ a=3;
+ while(a>0){
+ b = b+a;
+ a = a-1;
+ }
+ return b;
+}