diff --git a/docs/code/Boletin_4/Ejercicio_08.c b/docs/code/Boletin_4/Ejercicio_08.c index 036fe08..56d7631 100644 --- a/docs/code/Boletin_4/Ejercicio_08.c +++ b/docs/code/Boletin_4/Ejercicio_08.c @@ -1,14 +1,11 @@ // SPDX-FileCopyrightText: 2024 Sprinter05 // // SPDX-License-Identifier: GPL-3.0-only + +// Libraries #include #define N 10 -/*Design and implement a program in C language, by sequential search allow -finding the lowest and the highest index were a given X can be found into an -array of integers. The program should allow the user to properly enter the array -of integers and ask for the value you want to find.*/ - int main(){ // Define variables and ask for parameters int nums[N], guess, lGuess, uGuess; diff --git a/docs/code/Boletin_4/Ejercicio_11.c b/docs/code/Boletin_4/Ejercicio_11.c index d2b590a..b1c4770 100644 --- a/docs/code/Boletin_4/Ejercicio_11.c +++ b/docs/code/Boletin_4/Ejercicio_11.c @@ -1,10 +1,9 @@ // SPDX-FileCopyrightText: 2024 Sprinter05 // // SPDX-License-Identifier: GPL-3.0-only -#include -/*Design and implement a recursive function in C language that returns -the sum of the elements of an array of integers.*/ +// Libraries +#include // Sum all the elements of the array using recursion int arraySum(int n, int sumNums[n], int loops, int accum){ diff --git a/docs/code/Boletin_4/Ejercicio_27.c b/docs/code/Boletin_4/Ejercicio_27.c index 134fd9e..8b53f23 100644 --- a/docs/code/Boletin_4/Ejercicio_27.c +++ b/docs/code/Boletin_4/Ejercicio_27.c @@ -1,14 +1,11 @@ // SPDX-FileCopyrightText: 2024 Sprinter05 // // SPDX-License-Identifier: GPL-3.0-only + +// Libraries #include #define N 100 -/*Design and implement a program in C language to read a sentence -(maximum 100 characters) and then showing every word of it followed -by the number of letters that compose it. For simplicity, assume that -the words can be separated only by spaces, commas or periods.*/ - // Count the amount of characters in the string void countString(char toCount[N]){ int count = 0; diff --git a/docs/code/Boletin_4/Ejercicio_28.c b/docs/code/Boletin_4/Ejercicio_28.c index d172f91..32c3299 100644 --- a/docs/code/Boletin_4/Ejercicio_28.c +++ b/docs/code/Boletin_4/Ejercicio_28.c @@ -1,13 +1,11 @@ // SPDX-FileCopyrightText: 2024 Sprinter05 // // SPDX-License-Identifier: GPL-3.0-only + +// Libraries #include #define N 256 -/*Design and implement a program in C language to read a phrase (sequence of -characters to end of line), replace all sequences of two or more spaces with -a single space and the show the modified phrase.*/ - int main(){ // Define variables and ask for parameters int i=0, j=0; diff --git a/docs/code/Boletin_4/Ejercicio_36.c b/docs/code/Boletin_4/Ejercicio_36.c index 68104e6..74c3b32 100644 --- a/docs/code/Boletin_4/Ejercicio_36.c +++ b/docs/code/Boletin_4/Ejercicio_36.c @@ -1,14 +1,12 @@ // SPDX-FileCopyrightText: 2024 Sprinter05 // // SPDX-License-Identifier: GPL-3.0-only + +// Libraries #include #include #define N 100 -/*Implement a program that ask for five integers (ni > 0) and display each number and -factorial decomposition. Use a suitable data structure to store both the numbers -and decompositions.*/ - void factorialDecomp(int toDecomp){ int factors[N], primes=2, loops=0, og=toDecomp; // Check if its 1 or 0 and just print out that the decomp is 1 diff --git a/docs/code/Boletin_4/Ejercicio_37.c b/docs/code/Boletin_4/Ejercicio_37.c index 34c627a..89dc693 100644 --- a/docs/code/Boletin_4/Ejercicio_37.c +++ b/docs/code/Boletin_4/Ejercicio_37.c @@ -1,16 +1,12 @@ // SPDX-FileCopyrightText: 2024 Sprinter05 // // SPDX-License-Identifier: GPL-3.0-only + +// Libraries #include #define N 11 #define M 100 -/*Implement a program that reads a date and store it in a string that -fit your 10 characters (dd/mm/yyyy) adding zeros to the left of the day, -month and year if needed, and calculate and store in memory the next 100 leap years. -The program should give the user the option to change the date entered and -see on the screen the n leap years from the given date.*/ - void checkLeaps(int n, int year){ int closeLeap, leaps[M], counter=1; //Check closest diff --git a/docs/code/Boletin_4/Ejercicio_40.c b/docs/code/Boletin_4/Ejercicio_40.c index ca7fd6d..f49bc08 100644 --- a/docs/code/Boletin_4/Ejercicio_40.c +++ b/docs/code/Boletin_4/Ejercicio_40.c @@ -1,6 +1,8 @@ // SPDX-FileCopyrightText: 2024 Sprinter05 // // SPDX-License-Identifier: GPL-3.0-only + +// Libraries #include // Main library #include // For managing the program #include // Bool function @@ -10,8 +12,6 @@ #define SPEED 2 // Higher means faster: MUST BE GREATER OR EQUAL THAN 1 #define clear() printf("\033[H\033[J") // Clean screen -/*Design and implement a program in C language to simulate the game of life of John Conway.*/ - // NOTE: RUN FROM VSCODE TERMINAL OR THE MODERN WINDOWS TERMINAL APP NOT CMD OTHERWISE UTF-8 EMOJIS WILL NOT DISPLAY // ALSO MAKE SURE UTF-8 SUPPORT IS ENABLED IN YOUR TERMINAL OF CHOICE, APPLIES TO ALL OPERATING SYSTEMS diff --git a/src/Boletin_4/Ejercicio_08.c b/src/Boletin_4/Ejercicio_08.c index 036fe08..56d7631 100644 --- a/src/Boletin_4/Ejercicio_08.c +++ b/src/Boletin_4/Ejercicio_08.c @@ -1,14 +1,11 @@ // SPDX-FileCopyrightText: 2024 Sprinter05 // // SPDX-License-Identifier: GPL-3.0-only + +// Libraries #include #define N 10 -/*Design and implement a program in C language, by sequential search allow -finding the lowest and the highest index were a given X can be found into an -array of integers. The program should allow the user to properly enter the array -of integers and ask for the value you want to find.*/ - int main(){ // Define variables and ask for parameters int nums[N], guess, lGuess, uGuess; diff --git a/src/Boletin_4/Ejercicio_11.c b/src/Boletin_4/Ejercicio_11.c index d2b590a..b1c4770 100644 --- a/src/Boletin_4/Ejercicio_11.c +++ b/src/Boletin_4/Ejercicio_11.c @@ -1,10 +1,9 @@ // SPDX-FileCopyrightText: 2024 Sprinter05 // // SPDX-License-Identifier: GPL-3.0-only -#include -/*Design and implement a recursive function in C language that returns -the sum of the elements of an array of integers.*/ +// Libraries +#include // Sum all the elements of the array using recursion int arraySum(int n, int sumNums[n], int loops, int accum){ diff --git a/src/Boletin_4/Ejercicio_27.c b/src/Boletin_4/Ejercicio_27.c index 134fd9e..8b53f23 100644 --- a/src/Boletin_4/Ejercicio_27.c +++ b/src/Boletin_4/Ejercicio_27.c @@ -1,14 +1,11 @@ // SPDX-FileCopyrightText: 2024 Sprinter05 // // SPDX-License-Identifier: GPL-3.0-only + +// Libraries #include #define N 100 -/*Design and implement a program in C language to read a sentence -(maximum 100 characters) and then showing every word of it followed -by the number of letters that compose it. For simplicity, assume that -the words can be separated only by spaces, commas or periods.*/ - // Count the amount of characters in the string void countString(char toCount[N]){ int count = 0; diff --git a/src/Boletin_4/Ejercicio_28.c b/src/Boletin_4/Ejercicio_28.c index d172f91..32c3299 100644 --- a/src/Boletin_4/Ejercicio_28.c +++ b/src/Boletin_4/Ejercicio_28.c @@ -1,13 +1,11 @@ // SPDX-FileCopyrightText: 2024 Sprinter05 // // SPDX-License-Identifier: GPL-3.0-only + +// Libraries #include #define N 256 -/*Design and implement a program in C language to read a phrase (sequence of -characters to end of line), replace all sequences of two or more spaces with -a single space and the show the modified phrase.*/ - int main(){ // Define variables and ask for parameters int i=0, j=0; diff --git a/src/Boletin_4/Ejercicio_36.c b/src/Boletin_4/Ejercicio_36.c index 68104e6..74c3b32 100644 --- a/src/Boletin_4/Ejercicio_36.c +++ b/src/Boletin_4/Ejercicio_36.c @@ -1,14 +1,12 @@ // SPDX-FileCopyrightText: 2024 Sprinter05 // // SPDX-License-Identifier: GPL-3.0-only + +// Libraries #include #include #define N 100 -/*Implement a program that ask for five integers (ni > 0) and display each number and -factorial decomposition. Use a suitable data structure to store both the numbers -and decompositions.*/ - void factorialDecomp(int toDecomp){ int factors[N], primes=2, loops=0, og=toDecomp; // Check if its 1 or 0 and just print out that the decomp is 1 diff --git a/src/Boletin_4/Ejercicio_37.c b/src/Boletin_4/Ejercicio_37.c index 34c627a..89dc693 100644 --- a/src/Boletin_4/Ejercicio_37.c +++ b/src/Boletin_4/Ejercicio_37.c @@ -1,16 +1,12 @@ // SPDX-FileCopyrightText: 2024 Sprinter05 // // SPDX-License-Identifier: GPL-3.0-only + +// Libraries #include #define N 11 #define M 100 -/*Implement a program that reads a date and store it in a string that -fit your 10 characters (dd/mm/yyyy) adding zeros to the left of the day, -month and year if needed, and calculate and store in memory the next 100 leap years. -The program should give the user the option to change the date entered and -see on the screen the n leap years from the given date.*/ - void checkLeaps(int n, int year){ int closeLeap, leaps[M], counter=1; //Check closest diff --git a/src/Boletin_4/Ejercicio_40.c b/src/Boletin_4/Ejercicio_40.c index ca7fd6d..f49bc08 100644 --- a/src/Boletin_4/Ejercicio_40.c +++ b/src/Boletin_4/Ejercicio_40.c @@ -1,6 +1,8 @@ // SPDX-FileCopyrightText: 2024 Sprinter05 // // SPDX-License-Identifier: GPL-3.0-only + +// Libraries #include // Main library #include // For managing the program #include // Bool function @@ -10,8 +12,6 @@ #define SPEED 2 // Higher means faster: MUST BE GREATER OR EQUAL THAN 1 #define clear() printf("\033[H\033[J") // Clean screen -/*Design and implement a program in C language to simulate the game of life of John Conway.*/ - // NOTE: RUN FROM VSCODE TERMINAL OR THE MODERN WINDOWS TERMINAL APP NOT CMD OTHERWISE UTF-8 EMOJIS WILL NOT DISPLAY // ALSO MAKE SURE UTF-8 SUPPORT IS ENABLED IN YOUR TERMINAL OF CHOICE, APPLIES TO ALL OPERATING SYSTEMS