diff --git a/2023_CS50X/algorithms/Source/iteration.c b/2023_CS50X/algorithms/Source/iteration.c deleted file mode 100644 index 10d3e42..0000000 --- a/2023_CS50X/algorithms/Source/iteration.c +++ /dev/null @@ -1,28 +0,0 @@ -// Draws a pyramid using iteration - -#include -#include - -void draw(int n); - -int main(void) -{ - // Get height of pyramid - int height = get_int("Height: "); - - // Draw pyramid - draw(height); -} - -void draw(int n) -{ - // Draw pyramid of height n - for (int i = 0; i < n; i++) - { - for (int j = 0; j < i + 1; j++) - { - printf("#"); - } - printf("\n"); - } -} diff --git a/2023_CS50X/algorithms/Source/phonebook0.c b/2023_CS50X/algorithms/Source/phonebook0.c deleted file mode 100644 index 20b830f..0000000 --- a/2023_CS50X/algorithms/Source/phonebook0.c +++ /dev/null @@ -1,25 +0,0 @@ -// Implements a phone book without structs - -#include -#include -#include - -int main(void) -{ - // Arrays of strings - string names[] = {"Carter", "David"}; - string numbers[] = {"+1-617-495-1000", "+1-949-468-2750"}; - - // Search for name - string name = get_string("Name: "); - for (int i = 0; i < 2; i++) - { - if (strcmp(names[i], name) == 0) - { - printf("Found %s\n", numbers[i]); - return 0; - } - } - printf("Not found\n"); - return 1; -} diff --git a/2023_CS50X/algorithms/Source/phonebook1.c b/2023_CS50X/algorithms/Source/phonebook1.c deleted file mode 100644 index 8bf62f1..0000000 --- a/2023_CS50X/algorithms/Source/phonebook1.c +++ /dev/null @@ -1,36 +0,0 @@ -// Implements a phone book with structs - -#include -#include -#include - -typedef struct -{ - string name; - string number; -} -person; - -int main(void) -{ - person people[2]; - - people[0].name = "Carter"; - people[0].number = "+1-617-495-1000"; - - people[1].name = "David"; - people[1].number = "+1-949-468-2750"; - - // Search for name - string name = get_string("Name: "); - for (int i = 0; i < 2; i++) - { - if (strcmp(people[i].name, name) == 0) - { - printf("Found %s\n", people[i].number); - return 0; - } - } - printf("Not found\n"); - return 1; -} diff --git a/2023_CS50X/algorithms/Source/recursion0.c b/2023_CS50X/algorithms/Source/recursion0.c deleted file mode 100644 index 225a50a..0000000 --- a/2023_CS50X/algorithms/Source/recursion0.c +++ /dev/null @@ -1,23 +0,0 @@ -// Draws a pyramid (incorrectly) using recursion, -// must be compiled with -Wno-infinite-recursion - -#include -#include - -void draw(int n); - -int main(void) -{ - draw(1); -} - -void draw(int n) -{ - for (int i = 0; i < n; i++) - { - printf("#"); - } - printf("\n"); - - draw(n + 1); -} diff --git a/2023_CS50X/algorithms/Source/recursion1.c b/2023_CS50X/algorithms/Source/recursion1.c deleted file mode 100644 index 3adf1a6..0000000 --- a/2023_CS50X/algorithms/Source/recursion1.c +++ /dev/null @@ -1,34 +0,0 @@ -// Draws a pyramid using recursion - -#include -#include - -void draw(int n); - -int main(void) -{ - // Get height of pyramid - int height = get_int("Height: "); - - // Draw pyramid - draw(height); -} - -void draw(int n) -{ - // If nothing to draw - if (n <= 0) - { - return; - } - - // Draw pyramid of height n - 1 - draw(n - 1); - - // Draw one more row of width n - for (int i = 0; i < n; i++) - { - printf("#"); - } - printf("\n"); -} diff --git a/2023_CS50X/algorithms/Source/search0.c b/2023_CS50X/algorithms/Source/search0.c deleted file mode 100644 index 46d1b89..0000000 --- a/2023_CS50X/algorithms/Source/search0.c +++ /dev/null @@ -1,23 +0,0 @@ -// Implements linear search for integers - -#include -#include - -int main(void) -{ - // An array of integers - int numbers[] = {20, 500, 10, 5, 100, 1, 50}; - - // Search for number - int n = get_int("Number: "); - for (int i = 0; i < 7; i++) - { - if (numbers[i] == n) - { - printf("Found\n"); - return 0; - } - } - printf("Not found\n"); - return 1; -} diff --git a/2023_CS50X/algorithms/Source/search1.c b/2023_CS50X/algorithms/Source/search1.c deleted file mode 100644 index a78b226..0000000 --- a/2023_CS50X/algorithms/Source/search1.c +++ /dev/null @@ -1,24 +0,0 @@ -// Implements linear search for strings - -#include -#include -#include - -int main(void) -{ - // An array of strings - string strings[] = {"battleship", "boot", "cannon", "iron", "thimble", "top hat"}; - - // Search for string - string s = get_string("String: "); - for (int i = 0; i < 6; i++) - { - if (strcmp(strings[i], s) == 0) - { - printf("Found\n"); - return 0; - } - } - printf("Not found\n"); - return 1; -} diff --git a/2023_CS50X/arrays/Source/ascii0.c b/2023_CS50X/arrays/Source/ascii0.c deleted file mode 100644 index bcdac9a..0000000 --- a/2023_CS50X/arrays/Source/ascii0.c +++ /dev/null @@ -1,15 +0,0 @@ -// Explicitly casts chars to ints - -#include -#include -#include - -int main(void) -{ - string s = get_string("String: "); - for (int i = 0; i < strlen(s); i++) - { - int c = (int) s[i]; - printf("%c %i\n", s[i], c); - } -} diff --git a/2023_CS50X/arrays/Source/ascii1.c b/2023_CS50X/arrays/Source/ascii1.c deleted file mode 100644 index 15208f7..0000000 --- a/2023_CS50X/arrays/Source/ascii1.c +++ /dev/null @@ -1,14 +0,0 @@ -// Implicitly casts chars to ints - -#include -#include -#include - -int main(void) -{ - string s = get_string("String: "); - for (int i = 0; i < strlen(s); i++) - { - printf("%c %i\n", s[i], s[i]); - } -} diff --git a/2023_CS50X/arrays/Source/buggy0.c b/2023_CS50X/arrays/Source/buggy0.c deleted file mode 100644 index 80e83fd..0000000 --- a/2023_CS50X/arrays/Source/buggy0.c +++ /dev/null @@ -1,11 +0,0 @@ -// Buggy example for printf - -#include - -int main(void) -{ - for (int i = 0; i <= 3; i++) - { - printf("#\n"); - } -} diff --git a/2023_CS50X/arrays/Source/buggy1.c b/2023_CS50X/arrays/Source/buggy1.c deleted file mode 100644 index 2082587..0000000 --- a/2023_CS50X/arrays/Source/buggy1.c +++ /dev/null @@ -1,24 +0,0 @@ -// Buggy example for debug50 - -#include -#include - -int get_negative_int(void); - -int main(void) -{ - int i = get_negative_int(); - printf("%i\n", i); -} - -// Prompt user for positive integer -int get_negative_int(void) -{ - int n; - do - { - n = get_int("Negative Integer: "); - } - while (n < 0); - return n; -} diff --git a/2023_CS50X/arrays/Source/greet0.c b/2023_CS50X/arrays/Source/greet0.c deleted file mode 100644 index 8151b6b..0000000 --- a/2023_CS50X/arrays/Source/greet0.c +++ /dev/null @@ -1,10 +0,0 @@ -// Uses get_string - -#include -#include - -int main(void) -{ - string answer = get_string("What's your name? "); - printf("hello, %s\n", answer); -} diff --git a/2023_CS50X/arrays/Source/greet1.c b/2023_CS50X/arrays/Source/greet1.c deleted file mode 100644 index 4faf634..0000000 --- a/2023_CS50X/arrays/Source/greet1.c +++ /dev/null @@ -1,10 +0,0 @@ -// Uses get_string with better-named variable - -#include -#include - -int main(void) -{ - string name = get_string("What's your name? "); - printf("hello, %s\n", name); -} diff --git a/2023_CS50X/arrays/Source/greet2.c b/2023_CS50X/arrays/Source/greet2.c deleted file mode 100644 index e88dd18..0000000 --- a/2023_CS50X/arrays/Source/greet2.c +++ /dev/null @@ -1,16 +0,0 @@ -// Prints a command-line argument - -#include -#include - -int main(int argc, string argv[]) -{ - if (argc == 2) - { - printf("hello, %s\n", argv[1]); - } - else - { - printf("hello, world\n"); - } -} diff --git a/2023_CS50X/arrays/Source/greet3.c b/2023_CS50X/arrays/Source/greet3.c deleted file mode 100644 index 868753c..0000000 --- a/2023_CS50X/arrays/Source/greet3.c +++ /dev/null @@ -1,12 +0,0 @@ -// Prints command-line arguments - -#include -#include - -int main(int argc, string argv[]) -{ - for (int i = 0; i < argc; i++) - { - printf("%s\n", argv[i]); - } -} diff --git a/2023_CS50X/arrays/Source/hello0.c b/2023_CS50X/arrays/Source/hello0.c deleted file mode 100644 index 927f7b6..0000000 --- a/2023_CS50X/arrays/Source/hello0.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main(void) -{ - printf("hello, world\n"); -} diff --git a/2023_CS50X/arrays/Source/hello1.c b/2023_CS50X/arrays/Source/hello1.c deleted file mode 100644 index 591dd57..0000000 --- a/2023_CS50X/arrays/Source/hello1.c +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include - -int main(void) -{ - string name = get_string("What's your name? "); - printf("hello, %s\n", name); -} diff --git a/2023_CS50X/arrays/Source/hi0.c b/2023_CS50X/arrays/Source/hi0.c deleted file mode 100644 index 2284fa0..0000000 --- a/2023_CS50X/arrays/Source/hi0.c +++ /dev/null @@ -1,12 +0,0 @@ -// Prints chars - -#include - -int main(void) -{ - char c1 = 'H'; - char c2 = 'I'; - char c3 = '!'; - - printf("%c%c%c\n", c1, c2, c3); -} diff --git a/2023_CS50X/arrays/Source/hi1.c b/2023_CS50X/arrays/Source/hi1.c deleted file mode 100644 index ee1ae9c..0000000 --- a/2023_CS50X/arrays/Source/hi1.c +++ /dev/null @@ -1,12 +0,0 @@ -// Prints chars' ASCII codes - -#include - -int main(void) -{ - char c1 = 'H'; - char c2 = 'I'; - char c3 = '!'; - - printf("%i %i %i\n", c1, c2, c3); -} diff --git a/2023_CS50X/arrays/Source/hi2.c b/2023_CS50X/arrays/Source/hi2.c deleted file mode 100644 index 44cdc85..0000000 --- a/2023_CS50X/arrays/Source/hi2.c +++ /dev/null @@ -1,10 +0,0 @@ -// Prints string - -#include -#include - -int main(void) -{ - string s = "HI!"; - printf("%s\n", s); -} diff --git a/2023_CS50X/arrays/Source/hi3.c b/2023_CS50X/arrays/Source/hi3.c deleted file mode 100644 index 6e3e955..0000000 --- a/2023_CS50X/arrays/Source/hi3.c +++ /dev/null @@ -1,10 +0,0 @@ -// Prints string's ASCII codes - -#include -#include - -int main(void) -{ - string s = "HI!"; - printf("%i %i %i\n", s[0], s[1], s[2]); -} diff --git a/2023_CS50X/arrays/Source/hi4.c b/2023_CS50X/arrays/Source/hi4.c deleted file mode 100644 index d6ff6a1..0000000 --- a/2023_CS50X/arrays/Source/hi4.c +++ /dev/null @@ -1,10 +0,0 @@ -// Prints string's ASCII codes, including NUL - -#include -#include - -int main(void) -{ - string s = "HI!"; - printf("%i %i %i %i\n", s[0], s[1], s[2], s[3]); -} diff --git a/2023_CS50X/arrays/Source/hi5.c b/2023_CS50X/arrays/Source/hi5.c deleted file mode 100644 index 130afd6..0000000 --- a/2023_CS50X/arrays/Source/hi5.c +++ /dev/null @@ -1,13 +0,0 @@ -// Multiple strings - -#include -#include - -int main(void) -{ - string s = "HI!"; - string t = "BYE!"; - - printf("%s\n", s); - printf("%s\n", t); -} diff --git a/2023_CS50X/arrays/Source/hi6.c b/2023_CS50X/arrays/Source/hi6.c deleted file mode 100644 index 18af39e..0000000 --- a/2023_CS50X/arrays/Source/hi6.c +++ /dev/null @@ -1,15 +0,0 @@ -// Array of strings - -#include -#include - -int main(void) -{ - string words[2]; - - words[0] = "HI!"; - words[1] = "BYE!"; - - printf("%s\n", words[0]); - printf("%s\n", words[1]); -} diff --git a/2023_CS50X/arrays/Source/hi7.c b/2023_CS50X/arrays/Source/hi7.c deleted file mode 100644 index f14ce61..0000000 --- a/2023_CS50X/arrays/Source/hi7.c +++ /dev/null @@ -1,14 +0,0 @@ -#include -#include - - -int main(void) -{ - string words[2]; - - words[0] = "HI!"; - words[1] = "BYE!"; - - printf("%c%c%c\n", words[0][0], words[0][1], words[0][2]); - printf("%c%c%c%c\n", words[1][0], words[1][1], words[1][2], words[1][3]); -} diff --git a/2023_CS50X/arrays/Source/length0.c b/2023_CS50X/arrays/Source/length0.c deleted file mode 100644 index fb842a1..0000000 --- a/2023_CS50X/arrays/Source/length0.c +++ /dev/null @@ -1,18 +0,0 @@ -// Determines the length of a string - -#include -#include - -int main(void) -{ - // Prompt for user's name - string name = get_string("Name: "); - - // Count number of characters up until '\0' (aka NUL) - int n = 0; - while (name[n] != '\0') - { - n++; - } - printf("%i\n", n); -} diff --git a/2023_CS50X/arrays/Source/length1.c b/2023_CS50X/arrays/Source/length1.c deleted file mode 100644 index 034b57a..0000000 --- a/2023_CS50X/arrays/Source/length1.c +++ /dev/null @@ -1,25 +0,0 @@ -// Determines the length of a string using a function - -#include -#include - -int string_length(string s); - -int main(void) -{ - // Prompt for user's name - string name = get_string("Name: "); - int length = string_length(name); - printf("%i\n", length); -} - -int string_length(string s) -{ - // Count number of characters up until '\0' (aka NUL) - int n = 0; - while (s[n] != '\0') - { - n++; - } - return n; -} diff --git a/2023_CS50X/arrays/Source/length2.c b/2023_CS50X/arrays/Source/length2.c deleted file mode 100644 index 114911f..0000000 --- a/2023_CS50X/arrays/Source/length2.c +++ /dev/null @@ -1,13 +0,0 @@ -// Determines the length of a string using a function - -#include -#include -#include - -int main(void) -{ - // Prompt for user's name - string name = get_string("Name: "); - int length = strlen(name); - printf("%i\n", length); -} diff --git a/2023_CS50X/arrays/Source/scores0.c b/2023_CS50X/arrays/Source/scores0.c deleted file mode 100644 index 344a652..0000000 --- a/2023_CS50X/arrays/Source/scores0.c +++ /dev/null @@ -1,14 +0,0 @@ -// Averages three (hardcoded) numbers - -#include - -int main(void) -{ - // Scores - int score1 = 72; - int score2 = 73; - int score3 = 33; - - // Print average - printf("Average: %f\n", (score1 + score2 + score3) / 3.0); -} diff --git a/2023_CS50X/arrays/Source/scores1.c b/2023_CS50X/arrays/Source/scores1.c deleted file mode 100644 index f33a925..0000000 --- a/2023_CS50X/arrays/Source/scores1.c +++ /dev/null @@ -1,16 +0,0 @@ -// Averages three (hardcoded) numbers using an array - -#include -#include - -int main(void) -{ - // Scores - int scores[3]; - scores[0] = 72; - scores[1] = 73; - scores[2] = 33; - - // Print average - printf("Average: %f\n", (scores[0] + scores[1] + scores[2]) / 3.0); -} diff --git a/2023_CS50X/arrays/Source/scores2.c b/2023_CS50X/arrays/Source/scores2.c deleted file mode 100644 index b279f2d..0000000 --- a/2023_CS50X/arrays/Source/scores2.c +++ /dev/null @@ -1,16 +0,0 @@ -// Averages three numbers using an array - -#include -#include - -int main(void) -{ - // Get scores - int scores[3]; - scores[0] = get_int("Score: "); - scores[1] = get_int("Score: "); - scores[2] = get_int("Score: "); - - // Print average - printf("Average: %f\n", (scores[0] + scores[1] + scores[2]) / 3.0); -} diff --git a/2023_CS50X/arrays/Source/scores3.c b/2023_CS50X/arrays/Source/scores3.c deleted file mode 100644 index 9e52554..0000000 --- a/2023_CS50X/arrays/Source/scores3.c +++ /dev/null @@ -1,17 +0,0 @@ -// Averages three numbers using an array and a loop - -#include -#include - -int main(void) -{ - // Get scores - int scores[3]; - for (int i = 0; i < 3; i++) - { - scores[i] = get_int("Score: "); - } - - // Print average - printf("Average: %f\n", (scores[0] + scores[1] + scores[2]) / 3.0); -} diff --git a/2023_CS50X/arrays/Source/scores4.c b/2023_CS50X/arrays/Source/scores4.c deleted file mode 100644 index cb3177a..0000000 --- a/2023_CS50X/arrays/Source/scores4.c +++ /dev/null @@ -1,35 +0,0 @@ -// Averages three numbers using an array, a constant, and a helper function - -#include -#include - -// Constant -const int N = 3; - -// Prototype -float average(int length, int array[]); - -int main(void) -{ - // Get scores - int scores[N]; - for (int i = 0; i < N; i++) - { - scores[i] = get_int("Score: "); - } - - // Print average - printf("Average: %f\n", average(N, scores)); -} - -float average(int length, int array[]) -{ - // Calculate average - int sum = 0; - for (int i = 0; i < length; i++) - { - sum += array[i]; - } - return sum / (float) length; -} - diff --git a/2023_CS50X/arrays/Source/status.c b/2023_CS50X/arrays/Source/status.c deleted file mode 100644 index 2d74c79..0000000 --- a/2023_CS50X/arrays/Source/status.c +++ /dev/null @@ -1,15 +0,0 @@ -// Returns explicit value from main - -#include -#include - -int main(int argc, string argv[]) -{ - if (argc != 2) - { - printf("Missing command-line argument\n"); - return 1; - } - printf("hello, %s\n", argv[1]); - return 0; -} diff --git a/2023_CS50X/arrays/Source/string0.c b/2023_CS50X/arrays/Source/string0.c deleted file mode 100644 index 5045f8f..0000000 --- a/2023_CS50X/arrays/Source/string0.c +++ /dev/null @@ -1,16 +0,0 @@ -// Prints string char by char, using strlen - -#include -#include -#include - -int main(void) -{ - string s = get_string("Input: "); - printf("Output: "); - for (int i = 0; i < strlen(s); i++) - { - printf("%c", s[i]); - } - printf("\n"); -} diff --git a/2023_CS50X/arrays/Source/string1.c b/2023_CS50X/arrays/Source/string1.c deleted file mode 100644 index fe08b20..0000000 --- a/2023_CS50X/arrays/Source/string1.c +++ /dev/null @@ -1,16 +0,0 @@ -// Prints string char by char, using strlen, remembering string's length - -#include -#include -#include - -int main(void) -{ - string s = get_string("Input: "); - printf("Output: "); - for (int i = 0, n = strlen(s); i < n; i++) - { - printf("%c", s[i]); - } - printf("\n"); -} diff --git a/2023_CS50X/arrays/Source/uppercase0.c b/2023_CS50X/arrays/Source/uppercase0.c deleted file mode 100644 index 57b38a7..0000000 --- a/2023_CS50X/arrays/Source/uppercase0.c +++ /dev/null @@ -1,23 +0,0 @@ -// Uppercases a string - -#include -#include -#include - -int main(void) -{ - string s = get_string("Before: "); - printf("After: "); - for (int i = 0, n = strlen(s); i < n; i++) - { - if (s[i] >= 'a' && s[i] <= 'z') - { - printf("%c", s[i] - 32); - } - else - { - printf("%c", s[i]); - } - } - printf("\n"); -} diff --git a/2023_CS50X/arrays/Source/uppercase1.c b/2023_CS50X/arrays/Source/uppercase1.c deleted file mode 100644 index e17126d..0000000 --- a/2023_CS50X/arrays/Source/uppercase1.c +++ /dev/null @@ -1,24 +0,0 @@ -// Uppercases string using ctype library (and an unnecessary condition) - -#include -#include -#include -#include - -int main(void) -{ - string s = get_string("Before: "); - printf("After: "); - for (int i = 0, n = strlen(s); i < n; i++) - { - if (islower(s[i])) - { - printf("%c", toupper(s[i])); - } - else - { - printf("%c", s[i]); - } - } - printf("\n"); -} diff --git a/2023_CS50X/arrays/Source/uppercase2.c b/2023_CS50X/arrays/Source/uppercase2.c deleted file mode 100644 index 2a93c0f..0000000 --- a/2023_CS50X/arrays/Source/uppercase2.c +++ /dev/null @@ -1,17 +0,0 @@ -// Uppercases string using ctype library - -#include -#include -#include -#include - -int main(void) -{ - string s = get_string("Before: "); - printf("After: "); - for (int i = 0, n = strlen(s); i < n; i++) - { - printf("%c", toupper(s[i])); - } - printf("\n"); -} diff --git a/2023_CS50X/c/Source/agree.c b/2023_CS50X/c/Source/agree.c deleted file mode 100644 index dfc5db0..0000000 --- a/2023_CS50X/c/Source/agree.c +++ /dev/null @@ -1,20 +0,0 @@ -// Logical operators - -#include -#include - -int main(void) -{ - // Prompt user to agree - char c = get_char("Do you agree? "); - - // Check whether agreed - if (c == 'Y' || c == 'y') - { - printf("Agreed.\n"); - } - else if (c == 'N' || c == 'n') - { - printf("Not agreed.\n"); - } -} diff --git a/2023_CS50X/c/Source/calculator0.c b/2023_CS50X/c/Source/calculator0.c deleted file mode 100644 index 969ac0f..0000000 --- a/2023_CS50X/c/Source/calculator0.c +++ /dev/null @@ -1,16 +0,0 @@ -// Addition with int, allows for overflow - -#include -#include - -int main(void) -{ - // Prompt user for x - int x = get_int("x: "); - - // Prompt user for y - int y = get_int("y: "); - - // Perform addition - printf("%i\n", x + y); -} diff --git a/2023_CS50X/c/Source/calculator1.c b/2023_CS50X/c/Source/calculator1.c deleted file mode 100644 index 1987574..0000000 --- a/2023_CS50X/c/Source/calculator1.c +++ /dev/null @@ -1,16 +0,0 @@ -// Addition with long - -#include -#include - -int main(void) -{ - // Prompt user for x - long x = get_long("x: "); - - // Prompt user for y - long y = get_long("y: "); - - // Perform addition - printf("%li\n", x + y); -} diff --git a/2023_CS50X/c/Source/calculator2.c b/2023_CS50X/c/Source/calculator2.c deleted file mode 100644 index 6ce5ce6..0000000 --- a/2023_CS50X/c/Source/calculator2.c +++ /dev/null @@ -1,16 +0,0 @@ -// Division with longs, demonstrating truncation - -#include -#include - -int main(void) -{ - // Prompt user for x - long x = get_long("x: "); - - // Prompt user for y - long y = get_long("y: "); - - // Divide x by y - printf("%li\n", x / y); -} diff --git a/2023_CS50X/c/Source/calculator3.c b/2023_CS50X/c/Source/calculator3.c deleted file mode 100644 index 2e4f056..0000000 --- a/2023_CS50X/c/Source/calculator3.c +++ /dev/null @@ -1,17 +0,0 @@ -// Division with longs, demonstrating truncation - -#include -#include - -int main(void) -{ - // Prompt user for x - long x = get_long("x: "); - - // Prompt user for y - long y = get_long("y: "); - - // Divide x by y - float z = x / y; - printf("%f\n", z); -} diff --git a/2023_CS50X/c/Source/calculator4.c b/2023_CS50X/c/Source/calculator4.c deleted file mode 100644 index bb61dc7..0000000 --- a/2023_CS50X/c/Source/calculator4.c +++ /dev/null @@ -1,17 +0,0 @@ -// Division with longs, demonstrating type casting - -#include -#include - -int main(void) -{ - // Prompt user for x - long x = get_long("x: "); - - // Prompt user for y - long y = get_long("y: "); - - // Divide x by y - float z = (float) x / (float) y; - printf("%f\n", z); -} diff --git a/2023_CS50X/c/Source/calculator5.c b/2023_CS50X/c/Source/calculator5.c deleted file mode 100644 index 8f25209..0000000 --- a/2023_CS50X/c/Source/calculator5.c +++ /dev/null @@ -1,17 +0,0 @@ -// Division with longs, demonstrating floating-point imprecision - -#include -#include - -int main(void) -{ - // Prompt user for x - long x = get_long("x: "); - - // Prompt user for y - long y = get_long("y: "); - - // Divide x by y - float z = (float) x / (float) y; - printf("%.20f\n", z); -} diff --git a/2023_CS50X/c/Source/calculator6.c b/2023_CS50X/c/Source/calculator6.c deleted file mode 100644 index 7ea8f9b..0000000 --- a/2023_CS50X/c/Source/calculator6.c +++ /dev/null @@ -1,17 +0,0 @@ -// Division with longs, demonstrating double - -#include -#include - -int main(void) -{ - // Prompt user for x - long x = get_long("x: "); - - // Prompt user for y - long y = get_long("y: "); - - // Divide x by y - double z = (double) x / (double) y; - printf("%.20f\n", z); -} diff --git a/2023_CS50X/c/Source/compare0.c b/2023_CS50X/c/Source/compare0.c deleted file mode 100644 index 74f33ca..0000000 --- a/2023_CS50X/c/Source/compare0.c +++ /dev/null @@ -1,17 +0,0 @@ -// Conditionals, Boolean expressions, relational operators - -#include -#include - -int main(void) -{ - // Prompt user for integers - int x = get_int("What's x? "); - int y = get_int("What's y? "); - - // Compare integers - if (x < y) - { - printf("x is less than y\n"); - } -} diff --git a/2023_CS50X/c/Source/compare1.c b/2023_CS50X/c/Source/compare1.c deleted file mode 100644 index f373ba7..0000000 --- a/2023_CS50X/c/Source/compare1.c +++ /dev/null @@ -1,21 +0,0 @@ -// Conditionals, Boolean expressions, relational operators - -#include -#include - -int main(void) -{ - // Prompt user for integers - int x = get_int("What's x? "); - int y = get_int("What's y? "); - - // Compare integers - if (x < y) - { - printf("x is less than y\n"); - } - else - { - printf("x is not less than y\n"); - } -} diff --git a/2023_CS50X/c/Source/compare2.c b/2023_CS50X/c/Source/compare2.c deleted file mode 100644 index b1138aa..0000000 --- a/2023_CS50X/c/Source/compare2.c +++ /dev/null @@ -1,25 +0,0 @@ -// Conditionals, Boolean expressions, relational operators - -#include -#include - -int main(void) -{ - // Prompt user for integers - int x = get_int("What's x? "); - int y = get_int("What's y? "); - - // Compare integers - if (x < y) - { - printf("x is less than y\n"); - } - else if (x > y) - { - printf("x is greater than y\n"); - } - else if (x == y) - { - printf("x is equal to y\n"); - } -} diff --git a/2023_CS50X/c/Source/compare3.c b/2023_CS50X/c/Source/compare3.c deleted file mode 100644 index 8351a6b..0000000 --- a/2023_CS50X/c/Source/compare3.c +++ /dev/null @@ -1,25 +0,0 @@ -// Conditionals, Boolean expressions, relational operators - -#include -#include - -int main(void) -{ - // Prompt user for integers - int x = get_int("What's x? "); - int y = get_int("What's y? "); - - // Compare integers - if (x < y) - { - printf("x is less than y\n"); - } - else if (x > y) - { - printf("x is greater than y\n"); - } - else - { - printf("x is equal to y\n"); - } -} diff --git a/2023_CS50X/c/Source/countdown.c b/2023_CS50X/c/Source/countdown.c deleted file mode 100644 index 7d82510..0000000 --- a/2023_CS50X/c/Source/countdown.c +++ /dev/null @@ -1,15 +0,0 @@ -// Counting - -#include -#include -#include - -int main(void) -{ - int i = 0; - while (true) - { - printf("\r%i", i); - i++; - } -} diff --git a/2023_CS50X/c/Source/counter.c b/2023_CS50X/c/Source/counter.c deleted file mode 100644 index 90d3730..0000000 --- a/2023_CS50X/c/Source/counter.c +++ /dev/null @@ -1,14 +0,0 @@ -// Counting - -#include -#include - -int main(void) -{ - int i = 0; - while (true) - { - printf("\r%i", i); - i++; - } -} diff --git a/2023_CS50X/c/Source/hello0.c b/2023_CS50X/c/Source/hello0.c deleted file mode 100644 index 68e40b6..0000000 --- a/2023_CS50X/c/Source/hello0.c +++ /dev/null @@ -1,8 +0,0 @@ -// A program that says hello to the world - -#include - -int main(void) -{ - printf("hello, world\n"); -} diff --git a/2023_CS50X/c/Source/hello1.c b/2023_CS50X/c/Source/hello1.c deleted file mode 100644 index 0fdfef2..0000000 --- a/2023_CS50X/c/Source/hello1.c +++ /dev/null @@ -1,10 +0,0 @@ -// get_string and printf with incorrect placeholder - -#include -#include - -int main(void) -{ - string answer = get_string("What's your name? "); - printf("hello, answer\n"); -} diff --git a/2023_CS50X/c/Source/hello2.c b/2023_CS50X/c/Source/hello2.c deleted file mode 100644 index e55eb61..0000000 --- a/2023_CS50X/c/Source/hello2.c +++ /dev/null @@ -1,10 +0,0 @@ -// get_string and printf with %s - -#include -#include - -int main(void) -{ - string answer = get_string("What's your name? "); - printf("hello, %s\n", answer); -} diff --git a/2023_CS50X/c/Source/mario0.c b/2023_CS50X/c/Source/mario0.c deleted file mode 100644 index 1aad0c7..0000000 --- a/2023_CS50X/c/Source/mario0.c +++ /dev/null @@ -1,8 +0,0 @@ -// Prints a row of 4 question marks - -#include - -int main(void) -{ - printf("????\n"); -} diff --git a/2023_CS50X/c/Source/mario1.c b/2023_CS50X/c/Source/mario1.c deleted file mode 100644 index ef446bc..0000000 --- a/2023_CS50X/c/Source/mario1.c +++ /dev/null @@ -1,12 +0,0 @@ -// Prints a row of 4 question marks with a loop - -#include - -int main(void) -{ - for (int i = 0; i < 4; i++) - { - printf("?"); - } - printf("\n"); -} diff --git a/2023_CS50X/c/Source/mario2.c b/2023_CS50X/c/Source/mario2.c deleted file mode 100644 index a8b102c..0000000 --- a/2023_CS50X/c/Source/mario2.c +++ /dev/null @@ -1,11 +0,0 @@ -// Prints a column of 3 bricks with a loop - -#include - -int main(void) -{ - for (int i = 0; i < 3; i++) - { - printf("#\n"); - } -} diff --git a/2023_CS50X/c/Source/mario3.c b/2023_CS50X/c/Source/mario3.c deleted file mode 100644 index 97efbad..0000000 --- a/2023_CS50X/c/Source/mario3.c +++ /dev/null @@ -1,15 +0,0 @@ -// Prints a 3-by-3 grid of bricks with nested loops - -#include - -int main(void) -{ - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 3; j++) - { - printf("#"); - } - printf("\n"); - } -} diff --git a/2023_CS50X/c/Source/mario4.c b/2023_CS50X/c/Source/mario4.c deleted file mode 100644 index 52a664c..0000000 --- a/2023_CS50X/c/Source/mario4.c +++ /dev/null @@ -1,16 +0,0 @@ -// Prints a 3-by-3 grid of bricks with nested loops using a constant - -#include - -int main(void) -{ - const int n = 3; - for (int i = 0; i < n; i++) - { - for (int j = 0; j < n; j++) - { - printf("#"); - } - printf("\n"); - } -} diff --git a/2023_CS50X/c/Source/mario5.c b/2023_CS50X/c/Source/mario5.c deleted file mode 100644 index 881839c..0000000 --- a/2023_CS50X/c/Source/mario5.c +++ /dev/null @@ -1,18 +0,0 @@ -// Prints an n-by-n grid of bricks with nested loops - -#include -#include - -int main(void) -{ - int n = get_int("Size: "); - - for (int i = 0; i < n; i++) - { - for (int j = 0; j < n; j++) - { - printf("#"); - } - printf("\n"); - } -} diff --git a/2023_CS50X/c/Source/mario6.c b/2023_CS50X/c/Source/mario6.c deleted file mode 100644 index ae6541c..0000000 --- a/2023_CS50X/c/Source/mario6.c +++ /dev/null @@ -1,22 +0,0 @@ -// Prints an n-by-n grid of bricks, re-prompting user for positive integer - -#include -#include - -int main(void) -{ - int n = get_int("Size: "); - while (n < 1) - { - n = get_int("Size: "); - } - - for (int i = 0; i < n; i++) - { - for (int j = 0; j < n; j++) - { - printf("#"); - } - printf("\n"); - } -} diff --git a/2023_CS50X/c/Source/mario7.c b/2023_CS50X/c/Source/mario7.c deleted file mode 100644 index 47bf453..0000000 --- a/2023_CS50X/c/Source/mario7.c +++ /dev/null @@ -1,25 +0,0 @@ -// Prints an n-by-n grid of bricks, re-prompting user for positive integer - -#include -#include - -int main(void) -{ - // Get size of grid - int n; - do - { - n = get_int("Size: "); - } - while (n < 1); - - // Print grid of bricks - for (int i = 0; i < n; i++) - { - for (int j = 0; j < n; j++) - { - printf("#"); - } - printf("\n"); - } -} diff --git a/2023_CS50X/c/Source/mario8.c b/2023_CS50X/c/Source/mario8.c deleted file mode 100644 index 12ca24a..0000000 --- a/2023_CS50X/c/Source/mario8.c +++ /dev/null @@ -1,36 +0,0 @@ -// Prints an n-by-n grid of bricks, re-prompting user for positive integer - -#include -#include - -int get_size(void); -void print_grid(int n); - -int main(void) -{ - int n = get_size(); - print_grid(n); -} - -int get_size(void) -{ - int n; - do - { - n = get_int("Size: "); - } - while (n < 1); - return n; -} - -void print_grid(int n) -{ - for (int i = 0; i < n; i++) - { - for (int j = 0; j < n; j++) - { - printf("#"); - } - printf("\n"); - } -} diff --git a/2023_CS50X/c/Source/meow0.c b/2023_CS50X/c/Source/meow0.c deleted file mode 100644 index 457aa39..0000000 --- a/2023_CS50X/c/Source/meow0.c +++ /dev/null @@ -1,10 +0,0 @@ -// Opportunity for better design - -#include - -int main(void) -{ - printf("meow\n"); - printf("meow\n"); - printf("meow\n"); -} diff --git a/2023_CS50X/c/Source/meow1.c b/2023_CS50X/c/Source/meow1.c deleted file mode 100644 index 88ce846..0000000 --- a/2023_CS50X/c/Source/meow1.c +++ /dev/null @@ -1,13 +0,0 @@ -// Better design - -#include - -int main(void) -{ - int i = 0; - while (i < 3) - { - printf("meow\n"); - i++; - } -} diff --git a/2023_CS50X/c/Source/meow2.c b/2023_CS50X/c/Source/meow2.c deleted file mode 100644 index 023f307..0000000 --- a/2023_CS50X/c/Source/meow2.c +++ /dev/null @@ -1,11 +0,0 @@ -// Better design - -#include - -int main(void) -{ - for (int i = 0; i < 3; i++) - { - printf("meow\n"); - } -} diff --git a/2023_CS50X/c/Source/meow3.c b/2023_CS50X/c/Source/meow3.c deleted file mode 100644 index d118657..0000000 --- a/2023_CS50X/c/Source/meow3.c +++ /dev/null @@ -1,19 +0,0 @@ -// Abstraction - -#include - -void meow(void); - -int main(void) -{ - for (int i = 0; i < 3; i++) - { - meow(); - } -} - -// Meow once -void meow(void) -{ - printf("meow\n"); -} diff --git a/2023_CS50X/c/Source/meow4.c b/2023_CS50X/c/Source/meow4.c deleted file mode 100644 index 4a3d500..0000000 --- a/2023_CS50X/c/Source/meow4.c +++ /dev/null @@ -1,19 +0,0 @@ -// Abstraction with parameterization - -#include - -void meow(int n); - -int main(void) -{ - meow(3); -} - -// Meow some number of times -void meow(int n) -{ - for (int i = 0; i < n; i++) - { - printf("meow\n"); - } -} diff --git a/2023_CS50X/c/Source/points0.c b/2023_CS50X/c/Source/points0.c deleted file mode 100644 index dccb81c..0000000 --- a/2023_CS50X/c/Source/points0.c +++ /dev/null @@ -1,24 +0,0 @@ -// Conditionals, Boolean expressions, relational operators - -#include -#include - -int main(void) -{ - // Prompt user for points - int points = get_int("How many points did you lose? "); - - // Compare points against mine - if (points < 2) - { - printf("You lost fewer points than me.\n"); - } - else if (points > 2) - { - printf("You lost more points than me.\n"); - } - else if (points == 2) - { - printf("You lost the same number of points as me.\n"); - } -} diff --git a/2023_CS50X/c/Source/points1.c b/2023_CS50X/c/Source/points1.c deleted file mode 100644 index 5914c9d..0000000 --- a/2023_CS50X/c/Source/points1.c +++ /dev/null @@ -1,24 +0,0 @@ -// Design - -#include -#include - -int main(void) -{ - // Prompt user for points - int points = get_int("How many points did you lose? "); - - // Compare points against mine - if (points < 2) - { - printf("You lost fewer points than me.\n"); - } - else if (points > 2) - { - printf("You lost more points than me.\n"); - } - else - { - printf("You lost the same number of points as me.\n"); - } -} diff --git a/2023_CS50X/c/Source/points2.c b/2023_CS50X/c/Source/points2.c deleted file mode 100644 index 621a7c9..0000000 --- a/2023_CS50X/c/Source/points2.c +++ /dev/null @@ -1,27 +0,0 @@ -// Constants - -#include -#include - -int main(void) -{ - // Number of points that I lost - const int MINE = 2; - - // Prompt user for points - int points = get_int("How many points did you lose? "); - - // Compare points against mine - if (points < MINE) - { - printf("You lost fewer points than me.\n"); - } - else if (points > MINE) - { - printf("You lost more points than me.\n"); - } - else - { - printf("You lost the same number of points as me.\n"); - } -} diff --git a/2023_CS50X/c/cash/cash.c b/2023_CS50X/w1_c/cash/cash.c similarity index 100% rename from 2023_CS50X/c/cash/cash.c rename to 2023_CS50X/w1_c/cash/cash.c diff --git a/2023_CS50X/c/credit/credit.c b/2023_CS50X/w1_c/credit/credit.c similarity index 100% rename from 2023_CS50X/c/credit/credit.c rename to 2023_CS50X/w1_c/credit/credit.c diff --git a/2023_CS50X/c/hello/hello.c b/2023_CS50X/w1_c/hello/hello.c similarity index 100% rename from 2023_CS50X/c/hello/hello.c rename to 2023_CS50X/w1_c/hello/hello.c diff --git a/2023_CS50X/c/mario-more/mario.c b/2023_CS50X/w1_c/mario-more/mario.c similarity index 100% rename from 2023_CS50X/c/mario-more/mario.c rename to 2023_CS50X/w1_c/mario-more/mario.c diff --git a/2023_CS50X/c/population/population.c b/2023_CS50X/w1_c/population/population.c similarity index 100% rename from 2023_CS50X/c/population/population.c rename to 2023_CS50X/w1_c/population/population.c diff --git a/2023_CS50X/arrays/bulbs/bulbs.c b/2023_CS50X/w2_arrays/bulbs/bulbs.c similarity index 100% rename from 2023_CS50X/arrays/bulbs/bulbs.c rename to 2023_CS50X/w2_arrays/bulbs/bulbs.c diff --git a/2023_CS50X/arrays/readability/readability.c b/2023_CS50X/w2_arrays/readability/readability.c similarity index 100% rename from 2023_CS50X/arrays/readability/readability.c rename to 2023_CS50X/w2_arrays/readability/readability.c diff --git a/2023_CS50X/arrays/scrabble/scrabble.c b/2023_CS50X/w2_arrays/scrabble/scrabble.c similarity index 100% rename from 2023_CS50X/arrays/scrabble/scrabble.c rename to 2023_CS50X/w2_arrays/scrabble/scrabble.c diff --git a/2023_CS50X/algorithms/plurality/plurality.c b/2023_CS50X/w3_algorithms/plurality/plurality.c similarity index 100% rename from 2023_CS50X/algorithms/plurality/plurality.c rename to 2023_CS50X/w3_algorithms/plurality/plurality.c diff --git a/2023_CS50X/algorithms/runoff/runoff.c b/2023_CS50X/w3_algorithms/runoff/runoff.c similarity index 100% rename from 2023_CS50X/algorithms/runoff/runoff.c rename to 2023_CS50X/w3_algorithms/runoff/runoff.c diff --git a/2023_CS50X/algorithms/sort/answers.txt b/2023_CS50X/w3_algorithms/sort/answers.txt similarity index 100% rename from 2023_CS50X/algorithms/sort/answers.txt rename to 2023_CS50X/w3_algorithms/sort/answers.txt diff --git a/2023_CS50X/algorithms/sort/random10000.txt b/2023_CS50X/w3_algorithms/sort/random10000.txt similarity index 100% rename from 2023_CS50X/algorithms/sort/random10000.txt rename to 2023_CS50X/w3_algorithms/sort/random10000.txt diff --git a/2023_CS50X/algorithms/sort/random5000.txt b/2023_CS50X/w3_algorithms/sort/random5000.txt similarity index 100% rename from 2023_CS50X/algorithms/sort/random5000.txt rename to 2023_CS50X/w3_algorithms/sort/random5000.txt diff --git a/2023_CS50X/algorithms/sort/random50000.txt b/2023_CS50X/w3_algorithms/sort/random50000.txt similarity index 100% rename from 2023_CS50X/algorithms/sort/random50000.txt rename to 2023_CS50X/w3_algorithms/sort/random50000.txt diff --git a/2023_CS50X/algorithms/sort/reversed10000.txt b/2023_CS50X/w3_algorithms/sort/reversed10000.txt similarity index 100% rename from 2023_CS50X/algorithms/sort/reversed10000.txt rename to 2023_CS50X/w3_algorithms/sort/reversed10000.txt diff --git a/2023_CS50X/algorithms/sort/reversed5000.txt b/2023_CS50X/w3_algorithms/sort/reversed5000.txt similarity index 100% rename from 2023_CS50X/algorithms/sort/reversed5000.txt rename to 2023_CS50X/w3_algorithms/sort/reversed5000.txt diff --git a/2023_CS50X/algorithms/sort/reversed50000.txt b/2023_CS50X/w3_algorithms/sort/reversed50000.txt similarity index 100% rename from 2023_CS50X/algorithms/sort/reversed50000.txt rename to 2023_CS50X/w3_algorithms/sort/reversed50000.txt diff --git a/2023_CS50X/algorithms/sort/sorted10000.txt b/2023_CS50X/w3_algorithms/sort/sorted10000.txt similarity index 100% rename from 2023_CS50X/algorithms/sort/sorted10000.txt rename to 2023_CS50X/w3_algorithms/sort/sorted10000.txt diff --git a/2023_CS50X/algorithms/sort/sorted5000.txt b/2023_CS50X/w3_algorithms/sort/sorted5000.txt similarity index 100% rename from 2023_CS50X/algorithms/sort/sorted5000.txt rename to 2023_CS50X/w3_algorithms/sort/sorted5000.txt diff --git a/2023_CS50X/algorithms/sort/sorted50000.txt b/2023_CS50X/w3_algorithms/sort/sorted50000.txt similarity index 100% rename from 2023_CS50X/algorithms/sort/sorted50000.txt rename to 2023_CS50X/w3_algorithms/sort/sorted50000.txt diff --git a/2023_CS50X/algorithms/sort/test.txt b/2023_CS50X/w3_algorithms/sort/test.txt similarity index 100% rename from 2023_CS50X/algorithms/sort/test.txt rename to 2023_CS50X/w3_algorithms/sort/test.txt diff --git a/2023_CS50X/memory/filter-less/Makefile b/2023_CS50X/w4_memory/filter-less/Makefile similarity index 100% rename from 2023_CS50X/memory/filter-less/Makefile rename to 2023_CS50X/w4_memory/filter-less/Makefile diff --git a/2023_CS50X/memory/filter-less/bmp.h b/2023_CS50X/w4_memory/filter-less/bmp.h similarity index 100% rename from 2023_CS50X/memory/filter-less/bmp.h rename to 2023_CS50X/w4_memory/filter-less/bmp.h diff --git a/2023_CS50X/memory/filter-less/filter.c b/2023_CS50X/w4_memory/filter-less/filter.c similarity index 100% rename from 2023_CS50X/memory/filter-less/filter.c rename to 2023_CS50X/w4_memory/filter-less/filter.c diff --git a/2023_CS50X/memory/filter-less/helpers.c b/2023_CS50X/w4_memory/filter-less/helpers.c similarity index 100% rename from 2023_CS50X/memory/filter-less/helpers.c rename to 2023_CS50X/w4_memory/filter-less/helpers.c diff --git a/2023_CS50X/memory/filter-less/helpers.h b/2023_CS50X/w4_memory/filter-less/helpers.h similarity index 100% rename from 2023_CS50X/memory/filter-less/helpers.h rename to 2023_CS50X/w4_memory/filter-less/helpers.h diff --git a/2023_CS50X/memory/recover/recover.c b/2023_CS50X/w4_memory/recover/recover.c similarity index 100% rename from 2023_CS50X/memory/recover/recover.c rename to 2023_CS50X/w4_memory/recover/recover.c diff --git a/2023_CS50X/memory/recover/test.c b/2023_CS50X/w4_memory/recover/test.c similarity index 100% rename from 2023_CS50X/memory/recover/test.c rename to 2023_CS50X/w4_memory/recover/test.c diff --git a/2023_CS50X/memory/smiley/Makefile b/2023_CS50X/w4_memory/smiley/Makefile similarity index 100% rename from 2023_CS50X/memory/smiley/Makefile rename to 2023_CS50X/w4_memory/smiley/Makefile diff --git a/2023_CS50X/memory/smiley/bmp.h b/2023_CS50X/w4_memory/smiley/bmp.h similarity index 100% rename from 2023_CS50X/memory/smiley/bmp.h rename to 2023_CS50X/w4_memory/smiley/bmp.h diff --git a/2023_CS50X/memory/smiley/colorize.c b/2023_CS50X/w4_memory/smiley/colorize.c similarity index 100% rename from 2023_CS50X/memory/smiley/colorize.c rename to 2023_CS50X/w4_memory/smiley/colorize.c diff --git a/2023_CS50X/memory/smiley/helpers.c b/2023_CS50X/w4_memory/smiley/helpers.c similarity index 100% rename from 2023_CS50X/memory/smiley/helpers.c rename to 2023_CS50X/w4_memory/smiley/helpers.c diff --git a/2023_CS50X/memory/smiley/helpers.h b/2023_CS50X/w4_memory/smiley/helpers.h similarity index 100% rename from 2023_CS50X/memory/smiley/helpers.h rename to 2023_CS50X/w4_memory/smiley/helpers.h diff --git a/2023_CS50X/python/dna/dna.py b/2023_CS50X/w6_python/dna/dna.py similarity index 100% rename from 2023_CS50X/python/dna/dna.py rename to 2023_CS50X/w6_python/dna/dna.py diff --git a/2023_CS50X/python/dna/sequences/1.txt b/2023_CS50X/w6_python/dna/sequences/1.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/1.txt rename to 2023_CS50X/w6_python/dna/sequences/1.txt diff --git a/2023_CS50X/python/dna/sequences/10.txt b/2023_CS50X/w6_python/dna/sequences/10.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/10.txt rename to 2023_CS50X/w6_python/dna/sequences/10.txt diff --git a/2023_CS50X/python/dna/sequences/11.txt b/2023_CS50X/w6_python/dna/sequences/11.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/11.txt rename to 2023_CS50X/w6_python/dna/sequences/11.txt diff --git a/2023_CS50X/python/dna/sequences/12.txt b/2023_CS50X/w6_python/dna/sequences/12.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/12.txt rename to 2023_CS50X/w6_python/dna/sequences/12.txt diff --git a/2023_CS50X/python/dna/sequences/13.txt b/2023_CS50X/w6_python/dna/sequences/13.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/13.txt rename to 2023_CS50X/w6_python/dna/sequences/13.txt diff --git a/2023_CS50X/python/dna/sequences/14.txt b/2023_CS50X/w6_python/dna/sequences/14.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/14.txt rename to 2023_CS50X/w6_python/dna/sequences/14.txt diff --git a/2023_CS50X/python/dna/sequences/15.txt b/2023_CS50X/w6_python/dna/sequences/15.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/15.txt rename to 2023_CS50X/w6_python/dna/sequences/15.txt diff --git a/2023_CS50X/python/dna/sequences/16.txt b/2023_CS50X/w6_python/dna/sequences/16.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/16.txt rename to 2023_CS50X/w6_python/dna/sequences/16.txt diff --git a/2023_CS50X/python/dna/sequences/17.txt b/2023_CS50X/w6_python/dna/sequences/17.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/17.txt rename to 2023_CS50X/w6_python/dna/sequences/17.txt diff --git a/2023_CS50X/python/dna/sequences/18.txt b/2023_CS50X/w6_python/dna/sequences/18.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/18.txt rename to 2023_CS50X/w6_python/dna/sequences/18.txt diff --git a/2023_CS50X/python/dna/sequences/19.txt b/2023_CS50X/w6_python/dna/sequences/19.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/19.txt rename to 2023_CS50X/w6_python/dna/sequences/19.txt diff --git a/2023_CS50X/python/dna/sequences/2.txt b/2023_CS50X/w6_python/dna/sequences/2.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/2.txt rename to 2023_CS50X/w6_python/dna/sequences/2.txt diff --git a/2023_CS50X/python/dna/sequences/20.txt b/2023_CS50X/w6_python/dna/sequences/20.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/20.txt rename to 2023_CS50X/w6_python/dna/sequences/20.txt diff --git a/2023_CS50X/python/dna/sequences/3.txt b/2023_CS50X/w6_python/dna/sequences/3.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/3.txt rename to 2023_CS50X/w6_python/dna/sequences/3.txt diff --git a/2023_CS50X/python/dna/sequences/4.txt b/2023_CS50X/w6_python/dna/sequences/4.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/4.txt rename to 2023_CS50X/w6_python/dna/sequences/4.txt diff --git a/2023_CS50X/python/dna/sequences/5.txt b/2023_CS50X/w6_python/dna/sequences/5.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/5.txt rename to 2023_CS50X/w6_python/dna/sequences/5.txt diff --git a/2023_CS50X/python/dna/sequences/6.txt b/2023_CS50X/w6_python/dna/sequences/6.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/6.txt rename to 2023_CS50X/w6_python/dna/sequences/6.txt diff --git a/2023_CS50X/python/dna/sequences/7.txt b/2023_CS50X/w6_python/dna/sequences/7.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/7.txt rename to 2023_CS50X/w6_python/dna/sequences/7.txt diff --git a/2023_CS50X/python/dna/sequences/8.txt b/2023_CS50X/w6_python/dna/sequences/8.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/8.txt rename to 2023_CS50X/w6_python/dna/sequences/8.txt diff --git a/2023_CS50X/python/dna/sequences/9.txt b/2023_CS50X/w6_python/dna/sequences/9.txt similarity index 100% rename from 2023_CS50X/python/dna/sequences/9.txt rename to 2023_CS50X/w6_python/dna/sequences/9.txt diff --git a/2023_CS50X/python/sentimental-cash/cash.py b/2023_CS50X/w6_python/sentimental-cash/cash.py similarity index 100% rename from 2023_CS50X/python/sentimental-cash/cash.py rename to 2023_CS50X/w6_python/sentimental-cash/cash.py diff --git a/2023_CS50X/python/sentimental-hello/hello.py b/2023_CS50X/w6_python/sentimental-hello/hello.py similarity index 100% rename from 2023_CS50X/python/sentimental-hello/hello.py rename to 2023_CS50X/w6_python/sentimental-hello/hello.py diff --git a/2023_CS50X/python/sentimental-mario-less/mario.py b/2023_CS50X/w6_python/sentimental-mario-less/mario.py similarity index 100% rename from 2023_CS50X/python/sentimental-mario-less/mario.py rename to 2023_CS50X/w6_python/sentimental-mario-less/mario.py diff --git a/2023_CS50X/python/sentimental-readability/readability.py b/2023_CS50X/w6_python/sentimental-readability/readability.py similarity index 100% rename from 2023_CS50X/python/sentimental-readability/readability.py rename to 2023_CS50X/w6_python/sentimental-readability/readability.py diff --git a/2023_CS50X/python/world-cup/answers.txt b/2023_CS50X/w6_python/world-cup/answers.txt similarity index 100% rename from 2023_CS50X/python/world-cup/answers.txt rename to 2023_CS50X/w6_python/world-cup/answers.txt diff --git a/2023_CS50X/python/world-cup/tournament.py b/2023_CS50X/w6_python/world-cup/tournament.py similarity index 100% rename from 2023_CS50X/python/world-cup/tournament.py rename to 2023_CS50X/w6_python/world-cup/tournament.py diff --git a/2023_CS50X/web/homepage/about.html b/2023_CS50X/w8_web/homepage/about.html similarity index 100% rename from 2023_CS50X/web/homepage/about.html rename to 2023_CS50X/w8_web/homepage/about.html diff --git a/2023_CS50X/web/homepage/art.html b/2023_CS50X/w8_web/homepage/art.html similarity index 100% rename from 2023_CS50X/web/homepage/art.html rename to 2023_CS50X/w8_web/homepage/art.html diff --git a/2023_CS50X/web/homepage/contact.html b/2023_CS50X/w8_web/homepage/contact.html similarity index 100% rename from 2023_CS50X/web/homepage/contact.html rename to 2023_CS50X/w8_web/homepage/contact.html diff --git a/2023_CS50X/web/homepage/index.html b/2023_CS50X/w8_web/homepage/index.html similarity index 100% rename from 2023_CS50X/web/homepage/index.html rename to 2023_CS50X/w8_web/homepage/index.html diff --git a/2023_CS50X/web/homepage/photography.html b/2023_CS50X/w8_web/homepage/photography.html similarity index 100% rename from 2023_CS50X/web/homepage/photography.html rename to 2023_CS50X/w8_web/homepage/photography.html diff --git a/2023_CS50X/web/homepage/styles.css b/2023_CS50X/w8_web/homepage/styles.css similarity index 100% rename from 2023_CS50X/web/homepage/styles.css rename to 2023_CS50X/w8_web/homepage/styles.css diff --git a/2023_CS50X/web/trivia/index.html b/2023_CS50X/w8_web/trivia/index.html similarity index 100% rename from 2023_CS50X/web/trivia/index.html rename to 2023_CS50X/w8_web/trivia/index.html diff --git a/2023_CS50X/web/trivia/styles.css b/2023_CS50X/w8_web/trivia/styles.css similarity index 100% rename from 2023_CS50X/web/trivia/styles.css rename to 2023_CS50X/w8_web/trivia/styles.css diff --git a/2024_Praxis_der_Programmierung/ue1/a.out b/2024_Praxis_der_Programmierung/ue1/a.out deleted file mode 100755 index d0f3ff0..0000000 Binary files a/2024_Praxis_der_Programmierung/ue1/a.out and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue1/loesung/for1.c b/2024_Praxis_der_Programmierung/ue1/loesung/for1.c deleted file mode 100644 index 5ca3ff1..0000000 --- a/2024_Praxis_der_Programmierung/ue1/loesung/for1.c +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include - -int main() { - int i; - printf("\n"); - for (i=12; i>=0; i=i-2) { - if (i==0){ - - printf("%d \n", i); - } - else { - printf("%d, ", i); - } - } - - for (i=-1; i>=-13; i=i-2){ - if (i==-13){ - printf("%d \n", i); - } - else { - printf("%d, ", i); - } - } - - - for (i=0; i<=9; i++){ - if (i == 9){ - printf("%d \n", (int)pow(i,(double)2)); - } - else{ - printf("%d, ", (int)pow(i,(double)2)); - } - } - - for (i=0; i<=9; i++){ - if (i==9){ - printf("%d \n", i*i); - } - else{ - printf("%d, ", i*i); - } - } - - return 0; -} - diff --git a/2024_Praxis_der_Programmierung/ue1/loesung/formatelemente.c b/2024_Praxis_der_Programmierung/ue1/loesung/formatelemente.c deleted file mode 100644 index 4c30bce..0000000 --- a/2024_Praxis_der_Programmierung/ue1/loesung/formatelemente.c +++ /dev/null @@ -1,21 +0,0 @@ -/* formatelemente.c - * - * ACHTUNG: Enthaelt Fehler, die Sie bereinigen sollen! - * - */ - -#include - - main()i { - int i = 66; - double x = .000007; - double y = 123.45; - - printf("\ni:\n%d \n%o \n%x \n%X", i, i, i, i); - - printf("\nx:\n%f \n%e \n%E \n%g \n%G", x, x, x, x, x); - - printf("\ny:\n%g \n%G \n", y,y); - - return 0; -} diff --git a/2024_Praxis_der_Programmierung/ue1/loesung/gf.c b/2024_Praxis_der_Programmierung/ue1/loesung/gf.c deleted file mode 100644 index 736b245..0000000 --- a/2024_Praxis_der_Programmierung/ue1/loesung/gf.c +++ /dev/null @@ -1,21 +0,0 @@ -#include -#include - -int main() { - int fahrenheit = 0; - int stepsize = 20; - int maxF = 300; - - double celsius; - - printf("\n%s %s %s \n", "Fahrenheit","Celsius (gerundet)","Celsius (exakt)"); - - while (fahrenheit <= maxF) { - celsius = (5.0/9.0) * (fahrenheit - 32); - printf("%d\t\t%d\t\t%f\n", fahrenheit, (int)celsius, celsius); - fahrenheit += stepsize; - } - - return 0; -} - diff --git a/2024_Praxis_der_Programmierung/ue1/loesung/pri.c b/2024_Praxis_der_Programmierung/ue1/loesung/pri.c deleted file mode 100644 index ddb6cf5..0000000 --- a/2024_Praxis_der_Programmierung/ue1/loesung/pri.c +++ /dev/null @@ -1,8 +0,0 @@ -#include - -int main (){ - - printf("\n Ich kenn die Formatelemente zu 100%% \n"); - return 0; -} - diff --git a/2024_Praxis_der_Programmierung/ue1/loesung/typengroesse.c b/2024_Praxis_der_Programmierung/ue1/loesung/typengroesse.c deleted file mode 100644 index 87db467..0000000 --- a/2024_Praxis_der_Programmierung/ue1/loesung/typengroesse.c +++ /dev/null @@ -1,39 +0,0 @@ -/* typengroesse.c - * - * Bestimmung der Groesse der einfachen typen mit sizeof - */ - -#include - -int main() { - char c = 127; - unsigned char uc = 255; - - printf("\n"); - - //Ganzzahltypen - printf("char: \t\t%2d\n", (int) sizeof c); - printf("uns. char: \t%2d\n", (int) sizeof uc); - - printf("short: \t\t%2d\n", (int) sizeof (short)); - printf("uns. short: \t%2d\n", (int) sizeof (unsigned short)); - - printf("int: \t\t%2d\n", (int) sizeof (int)); - printf("uns. int: \t%2d\n", (int) sizeof (unsigned int)); - - printf("long: \t\t%2d \n", (int) sizeof (long)); - printf("uns. long: \t%2d \n", (int) sizeof (unsigned long)); - - printf("long long: \t%2d \n", (int) sizeof (long long)); - printf("uns. long long: %2d \n", (int) sizeof (unsigned long long)); - - // Gleitpunkttypen - printf("float: \t\t%2d\n", (int) sizeof (float)); - printf("double: \t%2d\n", (int) sizeof (double)); - printf("long double: \t%2d\n", (int) sizeof (long double)); - - - printf("\n"); - - return 0; -} diff --git a/2024_Praxis_der_Programmierung/ue1/loesung/while1.c b/2024_Praxis_der_Programmierung/ue1/loesung/while1.c deleted file mode 100644 index a9bd834..0000000 --- a/2024_Praxis_der_Programmierung/ue1/loesung/while1.c +++ /dev/null @@ -1,45 +0,0 @@ -#include -#include - -int main(){ - int i; - - printf("\n"); - - i=12; - while(i>=0){ - if (i==0){ - - printf("%d \n", i); - } - else { - printf("%d, ", i); - } - i=i-2; - } - - i=-1; - do{ - if (i==-13){ - printf("%d \n", i); - } - else { - printf("%d, ", i); - } - i=i-2; - } - while(i>=-13); - - i=0; - while(i<=9){ - if (i==9){ - printf("%d \n", i*i); - } - else{ - printf("%d, ", i*i); - } - i++; - } - - return 0; -} diff --git a/2024_Praxis_der_Programmierung/ue2/a.out b/2024_Praxis_der_Programmierung/ue2/a.out deleted file mode 100755 index 548b327..0000000 Binary files a/2024_Praxis_der_Programmierung/ue2/a.out and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue2/loesung/pt1.c b/2024_Praxis_der_Programmierung/ue2/loesung/pt1.c deleted file mode 100644 index 1f7f12d..0000000 --- a/2024_Praxis_der_Programmierung/ue2/loesung/pt1.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - -int main(){ - int i; - int *ptr = &i; - i = 1; - printf("ptr = %p \n", ptr); // ptr = 0x7fffc953d9f4 - printf("*ptr = %d \n", *ptr); // *ptr = 1 - printf("i = %d \n", i); - *ptr = 2; - printf("i = %d \n", i); -} diff --git a/2024_Praxis_der_Programmierung/ue2/loesung/pt1.o b/2024_Praxis_der_Programmierung/ue2/loesung/pt1.o deleted file mode 100644 index a5af7eb..0000000 Binary files a/2024_Praxis_der_Programmierung/ue2/loesung/pt1.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue2/loesung/quotient.c b/2024_Praxis_der_Programmierung/ue2/loesung/quotient.c deleted file mode 100644 index e5278db..0000000 --- a/2024_Praxis_der_Programmierung/ue2/loesung/quotient.c +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include - -int y; - -int f(int param1, int param2){ - if (param2 == 0) { - printf("Fehler: Division durch %d nicht möglich \n", param2); - exit(EXIT_FAILURE); - } - else { - int res = (2*(param1*param1)) / param2; - return res; - } -} - -int main(){ - int x = 4; - while (1) { - scanf("%d", &y); // scanf erwartet Speicheradresse - if (y != 0){ - break; - } - else { - printf("Fehler: Division durch 0 nicht möglich \n"); - } -} - printf("%d \n",f(x,y)); -} - diff --git a/2024_Praxis_der_Programmierung/ue2/loesung/quotient.o b/2024_Praxis_der_Programmierung/ue2/loesung/quotient.o deleted file mode 100644 index ce80910..0000000 Binary files a/2024_Praxis_der_Programmierung/ue2/loesung/quotient.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue2/loesung/swap.c b/2024_Praxis_der_Programmierung/ue2/loesung/swap.c deleted file mode 100644 index 023974f..0000000 --- a/2024_Praxis_der_Programmierung/ue2/loesung/swap.c +++ /dev/null @@ -1,15 +0,0 @@ -#include - -void swap(int *a1, int *a2){ - int s = *a1; - *a1 = *a2; - *a2 = s; -} -- -int main() { - int var1 = 4; - int var2 = 5; - printf("var1: %d, var2: %d \n", var1, var2); - swap(&var1, &var2); - printf("swapped var1: %d, swapped var2: %d \n", var1, var2); -} diff --git a/2024_Praxis_der_Programmierung/ue2/loesung/swap.o b/2024_Praxis_der_Programmierung/ue2/loesung/swap.o deleted file mode 100644 index 9503b3a..0000000 Binary files a/2024_Praxis_der_Programmierung/ue2/loesung/swap.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue3/a.out b/2024_Praxis_der_Programmierung/ue3/a.out deleted file mode 100755 index a7d3a40..0000000 Binary files a/2024_Praxis_der_Programmierung/ue3/a.out and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue3/loesung/.array_1.c.swp b/2024_Praxis_der_Programmierung/ue3/loesung/.array_1.c.swp deleted file mode 100644 index 6f869e3..0000000 Binary files a/2024_Praxis_der_Programmierung/ue3/loesung/.array_1.c.swp and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue3/loesung/.sqr_array_3.c.swp b/2024_Praxis_der_Programmierung/ue3/loesung/.sqr_array_3.c.swp deleted file mode 100644 index e79bcfc..0000000 Binary files a/2024_Praxis_der_Programmierung/ue3/loesung/.sqr_array_3.c.swp and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue3/loesung/array_1.c b/2024_Praxis_der_Programmierung/ue3/loesung/array_1.c deleted file mode 100644 index 233d74f..0000000 --- a/2024_Praxis_der_Programmierung/ue3/loesung/array_1.c +++ /dev/null @@ -1,49 +0,0 @@ -/* array_1.c - * - * Adressierung von Array-Elementen - * Indizes vs. Pointer - */ - -// ACHTUNG: Datei enthaelt zu beseitigende Fehler!!! - -#include - -int main() -{ - - int i = 0; - int ar[4]; - ar[0] = 10; - ar[1] = 20; - ar[2] = 30; - ar[3] = 40; - int len = (int) sizeof(ar)/sizeof(int); - printf("%d \n", len); - - printf("\nar: %p\t &ar[0]: %p", ar, &ar[0]); - -// i) Array-Syntax - printf("\n\nElemente von ar, indiziert:\n"); - for (i=0; i<=(len-1) ; i++){ // hier ergaenzen!!! - printf("%d\t",ar[i] ); // hier ergaenzen!!! - } - - printf("\n\nAdressen:\n"); - for (i=0; i<=(len-1); i++){ // hier ergaenzen!!! - printf("%p\t",&ar[i] ); // hier ergaenzen!!! - } - -// ii) Pointer-Syntax - printf("\n\nElemente von ar, referenziert:\n"); - for (i=0; i<=(len-1); i++){ // hier ergaenzen!!! - printf("%d\t", *(ar+i) ); // hier ergaenzen!!! - } - - printf("\n\nAdressen:\n"); - for (i=0; i<=(len-1); i++){ // hier ergaenzen!!! - printf("%p\t", ar+i ); // hier ergaenzen!!! - } - - printf("\n\n"); - return 0; -} diff --git a/2024_Praxis_der_Programmierung/ue3/loesung/array_1.o b/2024_Praxis_der_Programmierung/ue3/loesung/array_1.o deleted file mode 100644 index c1f599e..0000000 Binary files a/2024_Praxis_der_Programmierung/ue3/loesung/array_1.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue3/loesung/array_2.c b/2024_Praxis_der_Programmierung/ue3/loesung/array_2.c deleted file mode 100644 index 6a50673..0000000 --- a/2024_Praxis_der_Programmierung/ue3/loesung/array_2.c +++ /dev/null @@ -1,49 +0,0 @@ -/* array_1.c - * - * Adressierung von Array-Elementen - * Indizes vs. Pointer - */ - -// ACHTUNG: Datei enthaelt zu beseitigende Fehler!!! - -#include - -int main() -{ - - int i = 0; - int ar[3]; - ar[0] = 10; - ar[1] = 20; - ar[2] = 30; - ar[3] = 40; - int len = (int) sizeof(ar)/sizeof(int); - printf("%d \n", len); - - printf("\nar: %p\t &ar[0]: %p", ar, &ar[0]); - -// i) Array-Syntax - printf("\n\nElemente von ar, indiziert:\n"); - for (i=0; i<=(len+1) ; i++){ // hier ergaenzen!!! - printf("%d\t",ar[i] ); // hier ergaenzen!!! - } - - printf("\n\nAdressen:\n"); - for (i=0; i<=(len+1); i++){ // hier ergaenzen!!! - printf("%p\t",&ar[i] ); // hier ergaenzen!!! - } - -// ii) Pointer-Syntax - printf("\n\nElemente von ar, referenziert:\n"); - for (i=0; i<=(len+1); i++){ // hier ergaenzen!!! - printf("%d\t", *(ar+i) ); // hier ergaenzen!!! - } - - printf("\n\nAdressen:\n"); - for (i=0; i<=(len+1); i++){ // hier ergaenzen!!! - printf("%p\t", ar+i ); // hier ergaenzen!!! - } - - printf("\n\n"); - return 0; -} diff --git a/2024_Praxis_der_Programmierung/ue3/loesung/array_2.o b/2024_Praxis_der_Programmierung/ue3/loesung/array_2.o deleted file mode 100644 index 90b314e..0000000 Binary files a/2024_Praxis_der_Programmierung/ue3/loesung/array_2.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_1.c b/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_1.c deleted file mode 100644 index 467de6e..0000000 --- a/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_1.c +++ /dev/null @@ -1,12 +0,0 @@ -#include -#define LEN 10 - -int main (){ - int ar[LEN]; - for (int i = 1; i<=LEN; i++){ - ar[i-1] = i*i; - printf("%d ",ar[i-1]); - } - printf("\n"); -} - diff --git a/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_1.o b/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_1.o deleted file mode 100644 index 4d5da2c..0000000 Binary files a/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_1.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_2.c b/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_2.c deleted file mode 100644 index 29a674c..0000000 --- a/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_2.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#define LEN 10 - - -void rev_print(int * p){ - for (int i = LEN-1; i>= 0; i--){ - printf("%d ", *(p+i)); - } - printf("\n"); -} - - -int main (){ - int ar[LEN]; - for (int i = 1; i<=LEN; i++){ - ar[i-1] = i*i; - } - rev_print(ar); -} - diff --git a/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_2.o b/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_2.o deleted file mode 100644 index 7c4badb..0000000 Binary files a/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_2.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_3.o b/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_3.o deleted file mode 100644 index f7b0577..0000000 Binary files a/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_3.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_3_recovering.c b/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_3_recovering.c deleted file mode 100644 index 40cddfa..0000000 --- a/2024_Praxis_der_Programmierung/ue3/loesung/sqr_array_3_recovering.c +++ /dev/null @@ -1,30 +0,0 @@ -#include -#define LEN 1000 - -int main (){ - int ar[LEN]; - - for (int i = 0; i<=LEN; ++i){ - ar[i] = i*i; - } - - int input; - printf("Geben Sie eine ganze Zahl zwischen 1 und %d an: ", LEN); - - while (1){ - scanf("%d", &input); - printf("%d \n",input); - - if (input == 0){ - break; - } - if (input < 1 || input > LEN){ - continue; - } - - else{ - printf("%d \n", ar[input]); - } - } -} - diff --git a/2024_Praxis_der_Programmierung/ue3/loesung/table.c b/2024_Praxis_der_Programmierung/ue3/loesung/table.c deleted file mode 100644 index c0ea134..0000000 --- a/2024_Praxis_der_Programmierung/ue3/loesung/table.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#define zv printf("\n") - -int main(){ - int ar[3][4] = {{0, 1, 2, 3}, {10, 11, 12}}; - - int len_ar = (int) sizeof(ar)/sizeof(int); - int col = (int) sizeof(ar[0])/sizeof(int); - int row = len_ar/col; - - for (int i = 0; i - -int main() { - -char *statS = "Hallo PdP"; -char dynS[10] = "Hallo PdP"; - -printf("stat Buchstabe an 2. Stelle: %c \n", dynS[1]); -printf("dyn. Buchstabe an 2. Stelle: %c \n", statS[1]); - -//dynS[1] = 'e'; -//printf("dyn Buchstabe an 2. Stelle verändert: %c \n", dynS[1]); - -//statS[1] = 'e'; -//printf("stat Buchstabe an 2. Stelle verändert: %c \n", statS[1]); - -statS = "neuer String"; -printf("stat Buchstabe an 2. Stelle verändert: %c \n", statS[1]); - -dynS = "neuer String"; -printf("dyn. Buchstabe an 2. Stelle verändert: %c \n", dynS[1]); - -return 0; - -} diff --git a/2024_Praxis_der_Programmierung/ue4/loesung/char_array.c b/2024_Praxis_der_Programmierung/ue4/loesung/char_array.c deleted file mode 100644 index 3efb60c..0000000 --- a/2024_Praxis_der_Programmierung/ue4/loesung/char_array.c +++ /dev/null @@ -1,25 +0,0 @@ -/* char_array.c - * - * Entscheidung, ob eine Zeichenkette ein 'a' enthaelt - */ - -#include -#define MAX 40 - -int main() { - int index; - char eingabe [MAX]; - - printf("Bitte String eingeben (max. %d Zeichen): ", MAX-1); - fgets(eingabe, MAX, stdin); - - printf("\nEingabe: %s", eingabe); - - for (index = 0; eingabe[index] != '\0'; index++) - if (eingabe[index] == 'a') - break; - - - return 0; -} - diff --git a/2024_Praxis_der_Programmierung/ue4/loesung/char_array1.c b/2024_Praxis_der_Programmierung/ue4/loesung/char_array1.c deleted file mode 100644 index 85a1cc7..0000000 --- a/2024_Praxis_der_Programmierung/ue4/loesung/char_array1.c +++ /dev/null @@ -1,34 +0,0 @@ -/* char_array.c - * - * Entscheidung, ob eine Zeichenkette ein 'a' enthaelt - */ - -#include -#define MAX 40 - -int main() { - int index; - char eingabe [MAX]; - - printf("Bitte String eingeben (max. %d Zeichen): ", MAX-1); - fgets(eingabe, MAX, stdin); - - printf("\nEingabe: %s", eingabe); - - for (index = 0; eingabe[index] != '\0'; index++){ - if (eingabe[index] == 'a'){ - printf("Der String enthält an Position %d ein 'a' \n", index ); - break; - } - else { - if (eingabe[++index] == '\0'){ - printf("Der String enthält kein 'a'"); - } - else {continue;} - } - } - - - return 0; -} - diff --git a/2024_Praxis_der_Programmierung/ue4/loesung/char_array1.o b/2024_Praxis_der_Programmierung/ue4/loesung/char_array1.o deleted file mode 100644 index b3b7279..0000000 Binary files a/2024_Praxis_der_Programmierung/ue4/loesung/char_array1.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue4/loesung/fehler.o b/2024_Praxis_der_Programmierung/ue4/loesung/fehler.o deleted file mode 100644 index aaaf407..0000000 Binary files a/2024_Praxis_der_Programmierung/ue4/loesung/fehler.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue4/loesung/fehler_syntax_log.c b/2024_Praxis_der_Programmierung/ue4/loesung/fehler_syntax_log.c deleted file mode 100644 index 5e3c0b7..0000000 --- a/2024_Praxis_der_Programmierung/ue4/loesung/fehler_syntax_log.c +++ /dev/null @@ -1,31 +0,0 @@ -/* fehler.c - * - * Ein Programm, dass Compilerfehler, - * Laufzeitfehler und logische Fehler demonstriert. - */ - -#include - -int main() { - - int num1, num2; - num1 = 0; - num2 = 1; - int temp; - - printf("Der Quotient der Variablen ist: "); //Sytnaxfehler ; einfügen - printf("%d\n", num1/num2); - printf("\n"); // Syntaxfehler: Anführungzeichen fehlten - - printf("Jetzt werden die Variablenwerte vertauscht.\n"); - - // Dies muss korrigiert werden. (logischer Fehler!!!) - temp = num1; - num1 = num2; - num2 = temp; - - printf("Der Quotient der Vaiablen ist nun: "); - printf("%d\n", num1/num2); - - return 0; -} diff --git a/2024_Praxis_der_Programmierung/ue4/loesung/vor_nachname.c b/2024_Praxis_der_Programmierung/ue4/loesung/vor_nachname.c deleted file mode 100644 index 1271a94..0000000 --- a/2024_Praxis_der_Programmierung/ue4/loesung/vor_nachname.c +++ /dev/null @@ -1,58 +0,0 @@ -#include -#include -#define MAX 100 - -int main(){ - - char s1[MAX]; - char s2[MAX]; - char name[2*MAX]; - int index; - - // AUffordeurng Eingabe Name - printf("Gebe deinen Vornamen an: \n"); - fgets(s1, MAX, stdin); - printf("Gebe deinen Nachnamen an: \n"); - fgets (s2, MAX, stdin); - - // ob Vorund Nachname verschieden oder gleich sind - int rvalue = strcmp(s1, s2); - if (rvalue == 0){ - printf("Namen sind gleich \n"); - } - else { - printf("Strings sind ungleich \n"); - } - - // Großschreibung Nachname - for (index = 0; ((s2[index]) != '\0'); ++index){ - if ((int)s2[index] >= 97 && (int)s2[index] <= 122){ - s2[index] = (int) s2[index] - 32; - } - else{continue;} - } - // printf("großgeschriebener Nachname: %s \n", s2); - - // Vorname NACHNAME String - int len_s1 = strlen(s1); - if (len_s1 > 0 && s1[len_s1 - 1] == '\n') { - s1[len_s1 - 1] = ' '; - } - else {} - strcpy(name, s1); - strncat(name, s2, 2*MAX); - printf("%s", name); - - // Länge von Namen - int len_letters = 0; - for (index = 0; name[index] != '\0'; ++index){ - if ((name[index] >= 'A' && name[index] <= 'Z') || (name[index] >= 'a' && name[index] <= 'z')){ - len_letters ++; - } - else{continue;} - } - printf("Länge des Names: %d \n", len_letters); - - return 0; - -} diff --git a/2024_Praxis_der_Programmierung/ue4/loesung/vor_nachname.o b/2024_Praxis_der_Programmierung/ue4/loesung/vor_nachname.o deleted file mode 100644 index 34355f6..0000000 Binary files a/2024_Praxis_der_Programmierung/ue4/loesung/vor_nachname.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue5/loesung/pkub.c b/2024_Praxis_der_Programmierung/ue5/loesung/pkub.c deleted file mode 100644 index 1c9a4a9..0000000 --- a/2024_Praxis_der_Programmierung/ue5/loesung/pkub.c +++ /dev/null @@ -1,21 +0,0 @@ - -#include -#include - - - - -int main(int argc, char * argv[]){ - if (argc == 2) { - printf("bitte argument übergeben"); //argv ist programmname, - //argv[1] ist zhl daher 2 stk argc=2 - } - else { - double zahl = atof(argv[1]); //covert to float - printf("%s³ = %f\n", argv[1], zahl*zahl*zahl); - } - - return 0; -} - - diff --git a/2024_Praxis_der_Programmierung/ue5/loesung/pkub.o b/2024_Praxis_der_Programmierung/ue5/loesung/pkub.o deleted file mode 100644 index 2c267a6..0000000 Binary files a/2024_Praxis_der_Programmierung/ue5/loesung/pkub.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue5/loesung/point_1.c b/2024_Praxis_der_Programmierung/ue5/loesung/point_1.c deleted file mode 100644 index da8ffab..0000000 --- a/2024_Praxis_der_Programmierung/ue5/loesung/point_1.c +++ /dev/null @@ -1,37 +0,0 @@ -/* point_1.c - * - * Datentyp eines zweidimensionalen Punktes - * verschiedene Methoden der Komponentenselektion - */ - -#include - - struct point { - float x; - float y; - }; - -int main() { - struct point p1, p2; - struct point * ptr; - - ptr = &p1; - - // Pfeil- VS. Punktschreibweise - p1.x = 3; // Hier .x da p1 ein struct point ist - ptr->y = 4; // Hier ->y da ptr ein POINTER auf struct point ist - - printf("\nx-Koordinate von p1: %f", ptr->x); - printf("\ny-Koordinate von p1: %f", (*ptr).y); - - p2 = p1; - - printf("\nx-Koordinate von p2: %f", p2.x); - printf("\ny-Koordinate von p2: %f", (&p2)->y); - - printf("\n\n"); - return 0; -} - - - diff --git a/2024_Praxis_der_Programmierung/ue5/loesung/point_1.o b/2024_Praxis_der_Programmierung/ue5/loesung/point_1.o deleted file mode 100644 index 783675c..0000000 Binary files a/2024_Praxis_der_Programmierung/ue5/loesung/point_1.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue5/loesung/point_2.c b/2024_Praxis_der_Programmierung/ue5/loesung/point_2.c deleted file mode 100644 index 840ba29..0000000 --- a/2024_Praxis_der_Programmierung/ue5/loesung/point_2.c +++ /dev/null @@ -1,43 +0,0 @@ -/* point_1.c - * - * Datentyp eines zweidimensionalen Punktes - * verschiedene Methoden der Komponentenselektion - */ - -#include - - struct point { - float x; - float y; - }; - -void move(struct point * p, float newx, float newy){ - p->x = newx; - p->y = newy; -} - -int main() { - struct point p1, p2; - struct point * ptr; - - ptr = &p1; - - // Pfeil- VS. Punktschreibweise - p1.x = 3; // Hier .x da p1 ein struct point ist - ptr->y = 4; // Hier ->y da ptr ein POINTER auf struct point ist - - printf("\nx-Koordinate von p1: %f", ptr->x); - printf("\ny-Koordinate von p1: %f", (*ptr).y); - - p2 = p1; - - move(ptr, -5, -3); - printf("\n Nach dem verschieben von p1:"); - printf("\n x-Koordinate von p1 %f", p1.x); - printf("\ny-Koordinate von p1: %f", (&p1)->y); - printf("\nx-Koordinate von p2: %f", p2.x); - printf("\ny-Koordinate von p2: %f", (&p2)->y); - - printf("\n\n"); - return 0; -} diff --git a/2024_Praxis_der_Programmierung/ue5/loesung/point_2.o b/2024_Praxis_der_Programmierung/ue5/loesung/point_2.o deleted file mode 100644 index 048ea0a..0000000 Binary files a/2024_Praxis_der_Programmierung/ue5/loesung/point_2.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue5/loesung/point_3.c b/2024_Praxis_der_Programmierung/ue5/loesung/point_3.c deleted file mode 100644 index c7475b1..0000000 --- a/2024_Praxis_der_Programmierung/ue5/loesung/point_3.c +++ /dev/null @@ -1,47 +0,0 @@ -/* point_3.c - * - * Datentyp eines zweidimensionalen Punktes - * mit Funktion zum Verschieben - * und dynamischer Speicherverwaltung - */ - -#include -#include - -struct point { - float x; - float y; -}; - - -void move(struct point * punkt, float dx, float dy) { - punkt->x += dx; - punkt->y += dy; -} - - -int main() { - struct point * ptr; - - ptr = malloc(sizeof(struct point)); // impl. Typcast des Pointers - - if (ptr != NULL) { - ptr->x = 10; - ptr->y = 20; - - printf("\nx-Koordinate von p: %f", ptr->x); - printf("\ny-Koordinate von p: %f", ptr->y); - - free(ptr); - - printf("\n"); - printf("\nnach free():"); - - // Dangling Pointer! - printf("\nx-Koordinate von p: %f", ptr->x); - printf("\ny-Koordinate von p: %f", ptr->y); - - printf("\n\n"); - } - return 0; -} diff --git a/2024_Praxis_der_Programmierung/ue5/loesung/polygonenzug.c b/2024_Praxis_der_Programmierung/ue5/loesung/polygonenzug.c deleted file mode 100644 index 8fe9cf7..0000000 --- a/2024_Praxis_der_Programmierung/ue5/loesung/polygonenzug.c +++ /dev/null @@ -1,166 +0,0 @@ -#include -#include - -// Definition eines Punktes -typedef struct Point { - int x; - int y; - struct Point* next; -} Point; - -// Funktion zum Erstellen eines neuen Punktes -Point* create_point(int x, int y) { - Point* new_point = (Point*)malloc(sizeof(Point)); - if (new_point == NULL) { - printf("Memory allocation failed\n"); - return NULL; - } - new_point->x = x; - new_point->y = y; - new_point->next = NULL; - return new_point; -} - -// Funktion zum Anhängen eines Punktes an das Ende der Liste -void append(Point** head, int x, int y) { - Point* new_point = create_point(x, y); - if (*head == NULL) { - *head = new_point; - return; - } - Point* temp = *head; - while (temp->next != NULL) { - temp = temp->next; - } - temp->next = new_point; -} - -// Funktion zum Entfernen des letzten Punktes aus der Liste -int shorten(Point** head) { - if (*head == NULL) { - return -1; // Liste ist leer - } - if ((*head)->next == NULL) { - free(*head); - *head = NULL; - return 0; - } - Point* temp = *head; - while (temp->next->next != NULL) { - temp = temp->next; - } - free(temp->next); - temp->next = NULL; - return 0; -} - -// Funktion zum Ausgeben der Punkte in der Liste -void pretty_print(Point* head) { - Point* temp = head; - while (temp != NULL) { - printf("(%d, %d) -> ", temp->x, temp->y); - temp = temp->next; - } - printf("NULL\n"); -} - -// Funktion zum Einfügen eines Punktes an einer bestimmten Position -int insert(Point** head, int pos, int x, int y) { - if (pos < 0) { - return -1; // Ungültige Position - } - Point* new_point = create_point(x, y); - if (pos == 0) { - new_point->next = *head; - *head = new_point; - return 0; - } - Point* temp = *head; - for (int i = 0; i < pos - 1; i++) { - if (temp == NULL) { - free(new_point); - return -1; // Position außerhalb der Liste - } - temp = temp->next; - } - new_point->next = temp->next; - temp->next = new_point; - return 0; -} - -// Funktion zum Spiegeln der Liste -int mirror(Point** head) { - if (*head == NULL || (*head)->next == NULL) { - return -1; // Leere Liste oder nur ein Element - } - Point* prev = NULL; - Point* current = *head; - Point* next = NULL; - while (current != NULL) { - next = current->next; - current->next = prev; - prev = current; - current = next; - } - *head = prev; - return 0; -} - -// Hauptfunktion zum Testen der Implementierung -int main() { - Point* head = NULL; - - // Testen der append-Funktion - append(&head, 1, 2); - append(&head, 3, 4); - pretty_print(head); - - // Testen der shorten-Funktion - shorten(&head); - pretty_print(head); - shorten(&head); - pretty_print(head); - shorten(&head); // Sollte -1 zurückgeben, da die Liste leer ist - - // Testen der insert-Funktion - insert(&head, 0, 5, 6); - insert(&head, 1, 7, 8); - pretty_print(head); - - // Testen der mirror-Funktion - mirror(&head); - pretty_print(head); - - return 0; -} - -/* - -punkt (x,y) - -shorten(input: head, output: int (-1 nihctvgekalppt (bei leerer Liste, 0 hat geklappt) - free(speicherdresse von letztes element), vorletzten next auf null setzen, - -next von next (übernächstes) -wenn liste nur noch ein element: head von nächstes auf null - - -insert: (input: head, pos, le), output: 0,-1( --liste leer --position außerhalb liste pos> len(head) -- erstes, -- insert: nur elemente an position einfügen, die zurzeit schin besetzsind -- nihct letzte Element+1 als position möglich keine verlängerung sondern nur zwischen vorhanden elementen! möglich muss zwischen elemente gepackt werden -- - -mirror: input:head, ouput: int (-1(leere liste),0) -randfalle (ranfälle als komentar: wenn nru ein element, oer leer kein mirror möglich) -1. leere liste -> -1 -2. 1 element -> -1 - -nxt pointer auf vorherigr le setzen - -pretty print - -*/ - diff --git a/2024_Praxis_der_Programmierung/ue5/loesung/polygonenzug.o b/2024_Praxis_der_Programmierung/ue5/loesung/polygonenzug.o deleted file mode 100644 index c10245f..0000000 Binary files a/2024_Praxis_der_Programmierung/ue5/loesung/polygonenzug.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue5/loesung/typfehler.c b/2024_Praxis_der_Programmierung/ue5/loesung/typfehler.c deleted file mode 100644 index 03ed20a..0000000 --- a/2024_Praxis_der_Programmierung/ue5/loesung/typfehler.c +++ /dev/null @@ -1,31 +0,0 @@ -// typfehler.c -// -// Benutzereingaben mit Typfehler abfangen - -#include -#include - -int main() { - - float zahl; - int status; - char c; - - - while (1) { - printf("Geben Sie eine Zahl ein: "); - status = scanf("%f", &zahl); - if (status != 0){ - break; - } - do { - // - c = getchar(); - } - while (c != '\n'); - printf(" Typfehler bei Benutzeingabe"); - } - - printf("Die Zahl ist %f\n", zahl); - return 0; -} diff --git a/2024_Praxis_der_Programmierung/ue5/loesung/typfehler.o b/2024_Praxis_der_Programmierung/ue5/loesung/typfehler.o deleted file mode 100644 index 28fe9b0..0000000 Binary files a/2024_Praxis_der_Programmierung/ue5/loesung/typfehler.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue6/loesung/UE6_7.c b/2024_Praxis_der_Programmierung/ue6/loesung/UE6_7.c deleted file mode 100644 index 5ba567f..0000000 --- a/2024_Praxis_der_Programmierung/ue6/loesung/UE6_7.c +++ /dev/null @@ -1,18 +0,0 @@ - -#include - - -unsigned long long explode(unsigned int m, unsigned short n); - -int main(){ - printf("2* 2^n: %llu", explode(2,3)); -} - -unsigned long long explode(unsigned int m, unsigned short n){ - return m << n; // n mal nach links shiften m*2^n -} - -struct Node { -int data; -struct Node *next; -}; diff --git a/2024_Praxis_der_Programmierung/ue6/loesung/UE6_7.o b/2024_Praxis_der_Programmierung/ue6/loesung/UE6_7.o deleted file mode 100644 index 69ef5b0..0000000 Binary files a/2024_Praxis_der_Programmierung/ue6/loesung/UE6_7.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue6/loesung/date.c b/2024_Praxis_der_Programmierung/ue6/loesung/date.c deleted file mode 100644 index b6e8cc2..0000000 --- a/2024_Praxis_der_Programmierung/ue6/loesung/date.c +++ /dev/null @@ -1,17 +0,0 @@ -//date.c - -#include -#include "date.h" - -struct date setInitDate(int year){ - struct date d; - d.year = year; - d.month = 1; - d.day = 1; - return d; -} - -void printDate(struct date * datum){ - printf("date: %d.%d.%d \n", datum->day, datum->month, datum->year); -} - diff --git a/2024_Praxis_der_Programmierung/ue6/loesung/date.h b/2024_Praxis_der_Programmierung/ue6/loesung/date.h deleted file mode 100644 index 43930fd..0000000 --- a/2024_Praxis_der_Programmierung/ue6/loesung/date.h +++ /dev/null @@ -1,13 +0,0 @@ -// date.h - -#ifndef DATE_H -#define DATE_H - -struct date{ - int day, month, year; -}; - -struct date setInitDate(int year); -void printDate(struct date *d); - -#endif diff --git a/2024_Praxis_der_Programmierung/ue6/loesung/date.o b/2024_Praxis_der_Programmierung/ue6/loesung/date.o deleted file mode 100644 index c0aa0e3..0000000 Binary files a/2024_Praxis_der_Programmierung/ue6/loesung/date.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue6/loesung/highscore.c b/2024_Praxis_der_Programmierung/ue6/loesung/highscore.c deleted file mode 100644 index 2e6c658..0000000 --- a/2024_Praxis_der_Programmierung/ue6/loesung/highscore.c +++ /dev/null @@ -1,28 +0,0 @@ -//highscore.c - -#include "highscore.h" -#include - -//define TEST -#if defined TEST -int main(){ - struct highscore hs; - struct date datum = setInitDate(2077); - int score = 9001; - setHighscore(&hs, score, datum); - printHighscore(&hs); - - return 0; -} - -#endif - -void setHighscore(struct highscore *hs, struct date datum, int newscore){ - hs->date = datum; - hs->score = newscore; -} - -void printHighscore(struct highscore * hs){ - printf(" Scores ab %d \n", firstYear); - printf("your highscore: %d at date %d.%d.%d \n", hs->score, hs->date.day, hs->date.month, hs->date.year); -} \ No newline at end of file diff --git a/2024_Praxis_der_Programmierung/ue6/loesung/highscore.h b/2024_Praxis_der_Programmierung/ue6/loesung/highscore.h deleted file mode 100644 index eb8c9a2..0000000 --- a/2024_Praxis_der_Programmierung/ue6/loesung/highscore.h +++ /dev/null @@ -1,18 +0,0 @@ -// highscore.h - -#include "date.h" - -#ifndef HIGHSCORE_H -#define HIGHSCORE_H - -int firstYear; - -struct highscore{ - struct date date; - int score; -}; - -void setHighscore(struct highscore * hs, struct date datum, int newscore); -void printHighscore(struct highscore * hs); - -#endif \ No newline at end of file diff --git a/2024_Praxis_der_Programmierung/ue6/loesung/highscore.o b/2024_Praxis_der_Programmierung/ue6/loesung/highscore.o deleted file mode 100644 index 7f29864..0000000 Binary files a/2024_Praxis_der_Programmierung/ue6/loesung/highscore.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue6/loesung/rec_count.c b/2024_Praxis_der_Programmierung/ue6/loesung/rec_count.c deleted file mode 100644 index 1e954fb..0000000 --- a/2024_Praxis_der_Programmierung/ue6/loesung/rec_count.c +++ /dev/null @@ -1,28 +0,0 @@ -// rec_static.c - -#include - -void rec_out(int n); -void decr(int n); - - -int main(){ - rec_out(6); - return 0; -} - - -void decr(int n){ - rec_out(--n); -} - - -void rec_out(int n){ - static int count = 1; - printf("Die %d. Ausgabe.\n", count); - count++; - if (n > 1){ - decr(n); - } -} - diff --git a/2024_Praxis_der_Programmierung/ue6/loesung/rec_count.o b/2024_Praxis_der_Programmierung/ue6/loesung/rec_count.o deleted file mode 100644 index ede0798..0000000 Binary files a/2024_Praxis_der_Programmierung/ue6/loesung/rec_count.o and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue6/loesung/scores b/2024_Praxis_der_Programmierung/ue6/loesung/scores deleted file mode 100644 index b41aa7c..0000000 Binary files a/2024_Praxis_der_Programmierung/ue6/loesung/scores and /dev/null differ diff --git a/2024_Praxis_der_Programmierung/ue6/loesung/scores.c b/2024_Praxis_der_Programmierung/ue6/loesung/scores.c deleted file mode 100644 index ef44cac..0000000 --- a/2024_Praxis_der_Programmierung/ue6/loesung/scores.c +++ /dev/null @@ -1,13 +0,0 @@ -#include "highscore.h" - -int firstYear = 2000; - -int main(){ - struct highscore hs; - struct date datum = setInitDate(2077); - int score = 9001; - setHighscore(&hs, datum, score); - printHighscore(&hs); - - return 0; -} \ No newline at end of file diff --git a/2024_Praxis_der_Programmierung/ue6/loesung/scores.o b/2024_Praxis_der_Programmierung/ue6/loesung/scores.o deleted file mode 100644 index 7396f7e..0000000 Binary files a/2024_Praxis_der_Programmierung/ue6/loesung/scores.o and /dev/null differ