diff --git a/2024/01-operadores-y-estructuras-de-control/solution.cs b/2024/01-operadores-y-estructuras-de-control/solution.cs
new file mode 100644
index 0000000..527772e
--- /dev/null
+++ b/2024/01-operadores-y-estructuras-de-control/solution.cs
@@ -0,0 +1,103 @@
+using System;
+
+class OperadoresEstructurasControl
+{
+ public static void Execute()
+ {
+ // Operadores aritméticos
+ int suma = 5 + 3;
+ int resta = 10 - 4;
+ int multiplicacion = 6 * 7;
+ double division = 20 / 4;
+ int modulo = 15 % 4;
+
+ Console.WriteLine("Operadores Aritméticos:");
+ Console.WriteLine($"Suma: {suma}");
+ Console.WriteLine($"Resta: {resta}");
+ Console.WriteLine($"Multiplicación: {multiplicacion}");
+ Console.WriteLine($"División: {division}");
+ Console.WriteLine($"Módulo: {modulo}");
+
+ // Operadores lógicos
+ bool and = true && false;
+ bool or = true || false;
+ bool not = !true;
+
+ Console.WriteLine("\nOperadores Lógicos:");
+ Console.WriteLine($"AND: {and}");
+ Console.WriteLine($"OR: {or}");
+ Console.WriteLine($"NOT: {not}");
+
+ // Operadores de comparación
+ bool igual = 5 == int.Parse("5"); // Conversión necesaria en C#
+ bool diferente = 10 != 5;
+ bool mayorQue = 15 > 10;
+ bool menorQue = 7 < 12;
+
+ Console.WriteLine("\nOperadores de Comparación:");
+ Console.WriteLine($"Igual (==): {igual}");
+ Console.WriteLine($"Diferente (!=): {diferente}");
+ Console.WriteLine($"Mayor Que (>): {mayorQue}");
+ Console.WriteLine($"Menor Que (<): {menorQue}");
+
+ // Operadores de asignación
+ int x = 10;
+ x += 5; // equivalente a x = x + 5
+ int y = 20;
+ y *= 2; // equivalente a y = y * 2
+
+ Console.WriteLine("\nOperadores de Asignación:");
+ Console.WriteLine($"x: {x}");
+ Console.WriteLine($"y: {y}");
+
+ // Operadores bitwise
+ int bitwiseAnd = 5 & 3; // AND
+ int bitwiseOr = 5 | 3; // OR
+ int bitwiseXor = 5 ^ 3; // XOR
+ int bitwiseNot = ~5; // NOT
+ int leftShift = 5 << 1; // Left Shift
+ int rightShift = 5 >> 1; // Right Shift
+ int zeroFillRightShift = (int)((uint)5 >> 1); // Zero-fill Right Shift
+
+ Console.WriteLine("\nOperadores Bitwise:");
+ Console.WriteLine($"Bitwise AND (&): {bitwiseAnd}");
+ Console.WriteLine($"Bitwise OR (|): {bitwiseOr}");
+ Console.WriteLine($"Bitwise XOR (^): {bitwiseXor}");
+ Console.WriteLine($"Bitwise NOT (~): {bitwiseNot}");
+ Console.WriteLine($"Left Shift (<<): {leftShift}");
+ Console.WriteLine($"Right Shift (>>): {rightShift}");
+ Console.WriteLine($"Zero-fill Right Shift (>>>): {zeroFillRightShift}");
+
+ // Estructuras de control
+ // Condicionales
+ int edad = 18;
+ if (edad >= 18)
+ {
+ Console.WriteLine("\nEres mayor de edad.");
+ }
+ else
+ {
+ Console.WriteLine("\nEres menor de edad.");
+ }
+
+ // Iterativas
+ Console.WriteLine("\nNúmeros entre 10 y 55 (pares, no 16 ni múltiplos de 3):");
+ for (int i = 10; i <= 55; i++)
+ {
+ if (i % 2 == 0 && i != 16 && i % 3 != 0)
+ {
+ Console.WriteLine(i);
+ }
+ }
+
+ // Excepciones
+ try
+ {
+ throw new Exception("Este es un ejemplo de excepción.");
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"\nExcepción: {ex.Message}");
+ }
+ }
+}
diff --git a/README.md b/README.md
index 6804988..286c16c 100644
--- a/README.md
+++ b/README.md
@@ -70,7 +70,7 @@ dotnet run 2024 00
| # | Challenge | Difficulty | My Solution |
| :-: | ------------------------------------------------------------------------------------------- | :--------: | --------------------------------------------------------------------------------------------------------------------- |
| 00 | [Sintaxis, Variables, Tipos de datos y Hola Mundo](https://retosdeprogramacion.com/roadmap/)| 🟢 | [](./2024/00-sintaxis-variables-tipos-de-datos-y-hola-mundo/index.js)
[](./2024/00-sintaxis-variables-tipos-de-datos-y-hola-mundo/solution.ts)
[](./2024/00-sintaxis-variables-tipos-de-datos-y-hola-mundo/solution.php)
[](./2024/00-sintaxis-variables-tipos-de-datos-y-hola-mundo/solution.cs) |
-| 01 | [Operadores y Estructuras de Control](https://retosdeprogramacion.com/roadmap/) | 🟢 | [](./2024/01-operadores-y-estructuras-de-control/index.js)
[](./2024/01-operadores-y-estructuras-de-control/solution.ts)
[](./2024/01-operadores-y-estructuras-de-control/solution.php) |
+| 01 | [Operadores y Estructuras de Control](https://retosdeprogramacion.com/roadmap/) | 🟢 | [](./2024/01-operadores-y-estructuras-de-control/index.js)
[](./2024/01-operadores-y-estructuras-de-control/solution.ts)
[](./2024/01-operadores-y-estructuras-de-control/solution.php)
[](./2024/01-operadores-y-estructuras-de-control/solution.cs) |
| 02 | [Funciones y alcance](https://retosdeprogramacion.com/roadmap/) | 🟢 | [](./2024/02-funciones-y-alcance/index.js)
[](./2024/02-funciones-y-alcance/solution.ts)
[](./2024/02-funciones-y-alcance/solution.php) |
| 03 | [Estructuras de Datos](https://retosdeprogramacion.com/roadmap/) | 🟡 | [](./2024/03-estructuras-de-datos/index.js)
[](./2024/03-estructuras-de-datos/solution.ts)
[](./2024/03-estructuras-de-datos/solution.php) |
| 04 | [Cadena de Caracteres](https://retosdeprogramacion.com/roadmap/) | 🟡 | [](./2024/04-cadenas-de-caracteres/index.js)
[](./2024/04-cadenas-de-caracteres/solution.ts)
[](./2024/04-cadenas-de-caracteres/solution.php) |
diff --git a/weekly-challenges.cs b/weekly-challenges.cs
index 9f3c5cf..9d449fc 100644
--- a/weekly-challenges.cs
+++ b/weekly-challenges.cs
@@ -10,6 +10,7 @@ private class Challenge(string name, Action execute)
private static readonly Dictionary challenges2024 = new() {
{ "00", new Challenge("Sintaxis, variables, tipos de datos y ¡Hola, Mundo!", SintaxisVariables.Execute) },
+ { "01", new Challenge("Operadores y estructuras de control", OperadoresEstructurasControl.Execute) },
};
private static readonly Dictionary> challengeActions = new() {