summaryrefslogtreecommitdiff
path: root/wk2/sect2
diff options
context:
space:
mode:
authorFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-02-17 22:59:23 +0000
committerFudgerboy <91767657+Fudgerboy@users.noreply.github.com>2024-02-17 22:59:23 +0000
commita2682d25c6cd0e069ff73a43df74c17a63caabac (patch)
treebc5621a5a4b99495a64e41d2407cc5cde22061de /wk2/sect2
parentd3c2d73736cc188e7ad089bfb29d42bf29faf881 (diff)
Sat, Feb 17, 2024, 2:59 PM -08:00
Diffstat (limited to 'wk2/sect2')
-rw-r--r--wk2/sect2/alpha.c20
-rw-r--r--wk2/sect2/array.c22
-rw-r--r--wk2/sect2/cla.c12
-rw-r--r--wk2/sect2/initials.c13
-rw-r--r--wk2/sect2/str.c15
5 files changed, 0 insertions, 82 deletions
diff --git a/wk2/sect2/alpha.c b/wk2/sect2/alpha.c
deleted file mode 100644
index 054950f..0000000
--- a/wk2/sect2/alpha.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <stdio.h>
-#include <ctype.h>
-#include <cs50.h>
-#include <string.h>
-
-int main(void)
-{
- string word = get_string("Word: ");
- int l = strlen(word);
- for (int i = 0; i < l - 1; i++)
- {
- // If NOT alphabetical
- if (word[i] > word[i + 1])
- {
- printf("No\n");
- return 0;
- }
- }
- printf("Yes\n");
-}
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]);
- }
-}
diff --git a/wk2/sect2/cla.c b/wk2/sect2/cla.c
deleted file mode 100644
index 431b04c..0000000
--- a/wk2/sect2/cla.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <stdio.h>
-#include <ctype.h>
-#include <cs50.h>
-#include <string.h>
-
-int main(int argc, string argv[])
-{
- for (int i = 0; i < argc; i++)
- {
- printf("argv[%i] is %s\n", i, argv[i]);
- }
-}
diff --git a/wk2/sect2/initials.c b/wk2/sect2/initials.c
deleted file mode 100644
index 45a36c6..0000000
--- a/wk2/sect2/initials.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <stdio.h>
-#include <ctype.h>
-#include <cs50.h>
-#include <string.h>
-
-int main(int argc, string argv[])
-{
- for (int i = 1; i < argc; i++)
- {
- printf("%c", argv[i][0]);
- }
- printf("\n");
-}
diff --git a/wk2/sect2/str.c b/wk2/sect2/str.c
deleted file mode 100644
index 5075431..0000000
--- a/wk2/sect2/str.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <stdio.h>
-#include <ctype.h>
-#include <cs50.h>
-#include <string.h>
-
-int main(void)
-{
- string name = "Emma";
- int l = strlen(name);
- for (int i = 0; i < l; i++)
- {
- printf("%i ", name[i]);
- }
- printf("\n");
-}