summaryrefslogtreecommitdiff
path: root/wk2/sect2/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'wk2/sect2/array.c')
-rw-r--r--wk2/sect2/array.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/wk2/sect2/array.c b/wk2/sect2/array.c
index fbd76f3..3128c04 100644
--- a/wk2/sect2/array.c
+++ b/wk2/sect2/array.c
@@ -11,8 +11,11 @@ int main(void)
while (n < 1);
int array[n];
array[0] = 1;
- for (int i = 1; i < n; i++)
+ int i = 0;
+ do
{
+ i++
}
+ while (i < n);
}