summaryrefslogtreecommitdiff
path: root/wk2/sect2
diff options
context:
space:
mode:
Diffstat (limited to 'wk2/sect2')
-rw-r--r--wk2/sect2/array.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wk2/sect2/array.c b/wk2/sect2/array.c
index bece42f..a8807a7 100644
--- a/wk2/sect2/array.c
+++ b/wk2/sect2/array.c
@@ -15,8 +15,8 @@ int main(void)
{
array[i] = array[i - 1] * 2;
}
- for (int i = 0; j < n; j++)
+ for (int i = 0; i < n; i++)
{
- printf("%i\n", array[j]);
+ printf("%i\n", array[i]);
}
}