Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

Commit

Permalink
Añadida linea entre Licencia-Codigo y eliminado enunciados
Browse files Browse the repository at this point in the history
  • Loading branch information
Sprinter05 committed Mar 7, 2024
1 parent a7c73e1 commit 4bc08fb
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 58 deletions.
7 changes: 2 additions & 5 deletions docs/code/Boletin_4/Ejercicio_08.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// SPDX-FileCopyrightText: 2024 Sprinter05
//
// SPDX-License-Identifier: GPL-3.0-only

// Libraries
#include <stdio.h>
#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;
Expand Down
5 changes: 2 additions & 3 deletions docs/code/Boletin_4/Ejercicio_11.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// SPDX-FileCopyrightText: 2024 Sprinter05
//
// SPDX-License-Identifier: GPL-3.0-only
#include <stdio.h>

/*Design and implement a recursive function in C language that returns
the sum of the elements of an array of integers.*/
// Libraries
#include <stdio.h>

// Sum all the elements of the array using recursion
int arraySum(int n, int sumNums[n], int loops, int accum){
Expand Down
7 changes: 2 additions & 5 deletions docs/code/Boletin_4/Ejercicio_27.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// SPDX-FileCopyrightText: 2024 Sprinter05
//
// SPDX-License-Identifier: GPL-3.0-only

// Libraries
#include <stdio.h>
#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;
Expand Down
6 changes: 2 additions & 4 deletions docs/code/Boletin_4/Ejercicio_28.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// SPDX-FileCopyrightText: 2024 Sprinter05
//
// SPDX-License-Identifier: GPL-3.0-only

// Libraries
#include <stdio.h>
#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;
Expand Down
6 changes: 2 additions & 4 deletions docs/code/Boletin_4/Ejercicio_36.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
// SPDX-FileCopyrightText: 2024 Sprinter05
//
// SPDX-License-Identifier: GPL-3.0-only

// Libraries
#include <stdio.h>
#include <stdbool.h>
#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
Expand Down
8 changes: 2 additions & 6 deletions docs/code/Boletin_4/Ejercicio_37.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
// SPDX-FileCopyrightText: 2024 Sprinter05
//
// SPDX-License-Identifier: GPL-3.0-only

// Libraries
#include <stdio.h>
#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
Expand Down
4 changes: 2 additions & 2 deletions docs/code/Boletin_4/Ejercicio_40.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// SPDX-FileCopyrightText: 2024 Sprinter05
//
// SPDX-License-Identifier: GPL-3.0-only

// Libraries
#include <stdio.h> // Main library
#include <stdlib.h> // For managing the program
#include <stdbool.h> // Bool function
Expand All @@ -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

Expand Down
7 changes: 2 additions & 5 deletions src/Boletin_4/Ejercicio_08.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// SPDX-FileCopyrightText: 2024 Sprinter05
//
// SPDX-License-Identifier: GPL-3.0-only

// Libraries
#include <stdio.h>
#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;
Expand Down
5 changes: 2 additions & 3 deletions src/Boletin_4/Ejercicio_11.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// SPDX-FileCopyrightText: 2024 Sprinter05
//
// SPDX-License-Identifier: GPL-3.0-only
#include <stdio.h>

/*Design and implement a recursive function in C language that returns
the sum of the elements of an array of integers.*/
// Libraries
#include <stdio.h>

// Sum all the elements of the array using recursion
int arraySum(int n, int sumNums[n], int loops, int accum){
Expand Down
7 changes: 2 additions & 5 deletions src/Boletin_4/Ejercicio_27.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
// SPDX-FileCopyrightText: 2024 Sprinter05
//
// SPDX-License-Identifier: GPL-3.0-only

// Libraries
#include <stdio.h>
#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;
Expand Down
6 changes: 2 additions & 4 deletions src/Boletin_4/Ejercicio_28.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// SPDX-FileCopyrightText: 2024 Sprinter05
//
// SPDX-License-Identifier: GPL-3.0-only

// Libraries
#include <stdio.h>
#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;
Expand Down
6 changes: 2 additions & 4 deletions src/Boletin_4/Ejercicio_36.c
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
// SPDX-FileCopyrightText: 2024 Sprinter05
//
// SPDX-License-Identifier: GPL-3.0-only

// Libraries
#include <stdio.h>
#include <stdbool.h>
#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
Expand Down
8 changes: 2 additions & 6 deletions src/Boletin_4/Ejercicio_37.c
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
// SPDX-FileCopyrightText: 2024 Sprinter05
//
// SPDX-License-Identifier: GPL-3.0-only

// Libraries
#include <stdio.h>
#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
Expand Down
4 changes: 2 additions & 2 deletions src/Boletin_4/Ejercicio_40.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// SPDX-FileCopyrightText: 2024 Sprinter05
//
// SPDX-License-Identifier: GPL-3.0-only

// Libraries
#include <stdio.h> // Main library
#include <stdlib.h> // For managing the program
#include <stdbool.h> // Bool function
Expand All @@ -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

Expand Down

0 comments on commit 4bc08fb

Please sign in to comment.