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.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/wk2/sect2/array.c b/wk2/sect2/array.c
deleted file mode 100644
index a8807a7..0000000
--- a/wk2/sect2/array.c
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <cs50.h>
-#include <stdio.h>
-
-int main(void)
-{
- int n;
- do
- {
- n = get_int("Length: ");
- }
- while (n < 1);
- int array[n];
- array[0] = 1;
- for (int i = 1; i < n; i++)
- {
- array[i] = array[i - 1] * 2;
- }
- for (int i = 0; i < n; i++)
- {
- printf("%i\n", array[i]);
- }
-}