summaryrefslogtreecommitdiff
path: root/3/6_control/24_while_loop.c
diff options
context:
space:
mode:
authorMike Vink <mike@pionative.com>2024-05-22 08:49:29 +0200
committerMike Vink <mike@pionative.com>2024-05-22 08:49:29 +0200
commit51169f5f9ab178a4ddfe9dac461405a71c9c0f94 (patch)
tree0b6bb0c6c31ee27361b28e2c5993f362c1cc95e2 /3/6_control/24_while_loop.c
parent77f19e4a89d8dec97930c5e237139734c5fb3365 (diff)
organise
Diffstat (limited to '3/6_control/24_while_loop.c')
-rw-r--r--3/6_control/24_while_loop.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/3/6_control/24_while_loop.c b/3/6_control/24_while_loop.c
new file mode 100644
index 0000000..a3367fc
--- /dev/null
+++ b/3/6_control/24_while_loop.c
@@ -0,0 +1,24 @@
+// while (test)
+// body
+//
+// goto test;
+// loop:
+// body;
+// test:
+// t = test;
+// if (t)
+// goto loop;
+
+short loop_while(short a, short b)
+{
+ short result = ;
+ while () {
+ result = ;
+ a = ;
+ }
+ return result;
+}
+
+int main(void) {
+ return 0;
+}