forked from mouredev/roadmap-retos-programacion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/Sac-Corts/roadmap-retos-pro…
- Loading branch information
Showing
461 changed files
with
54,267 additions
and
2,287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
*.xml | ||
*.iml | ||
*.json | ||
*.csv | ||
!stats.json | ||
.DS_Store | ||
.idea/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/c#/ProTpuS98.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace PracticasLogicaProgramacion | ||
{ | ||
internal class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
//EJERCICIOS | ||
//1. Crea un comentario en el código y coloca la URL del | ||
//sitio web oficial del lenguaje de programación que has seleccionado. | ||
|
||
https://learn.microsoft.com/en-us/dotnet/csharp/ | ||
|
||
//2. Representa las diferentes sintaxis que existen de crear comentarios | ||
//en el lenguaje (en una línea, varias...). | ||
|
||
//Este se utiliza para escribir comentarios de una sola linea. | ||
/* | ||
este se utiliza para escribir comentarios de varias lineas. | ||
*/ | ||
|
||
//3. Crea una variable (y una constante si el lenguaje lo soporta). | ||
|
||
private int num; | ||
private const int numConst; | ||
|
||
//4. Crea variables representando todos los tipos de datos primitivos | ||
//del lenguaje (cadenas de texto, enteros, booleanos...). | ||
|
||
//1. Enteros | ||
private int num1; //numeros enteros de 32 bits. | ||
private long num2; //numeros enteros de 64 bits. | ||
private short num3; //numeros enteros de 16 bits. | ||
private byte num4; //numeros enteros sin signo de 8 bits. | ||
private sbyte num5; //numeros enteros con signo de 8 bits. | ||
private uint num6; //numeros enteros sin signo de 32 bits, | ||
private ulong num7; //numeros enteros sin signo de 64 bits. | ||
private ushort num8; //numeros enteros sin signo de 16 bits. | ||
|
||
//2. Float | ||
private float num9; //Números de punto flotante de precisión simple (32 bits). | ||
private double num10; //Números de punto flotante de doble precisión (64 bits). | ||
|
||
//3. Decimal | ||
private decimal num11; //Números decimales de alta precisión, generalmente usados para cálculos financieros (128 bits). | ||
|
||
//4. Booleanos | ||
bool jump; // Representa valores booleanos (true o false). | ||
|
||
//5. Caracteres | ||
private char Caracter; //Representa un carácter Unicode UTF-16 (16 bits). | ||
|
||
//6. Cadenas | ||
private string name; //Secuencia de caracteres Unicode. | ||
|
||
//5. Imprime por terminal el texto: "¡Hola, [y el nombre de tu lenguaje]!" | ||
EJERCICIO ejercicio = new EJERCICIO(); | ||
ejercicio.saludo(); | ||
|
||
} | ||
public class EJERCICIOS | ||
{ | ||
public void Saludo() | ||
{ | ||
Console.WriteLines("¡Hola, [C#]!") | ||
} | ||
|
||
} | ||
} | ||
} | ||
|
36 changes: 36 additions & 0 deletions
36
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/c++/Eberstr.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
// url: isocpp.org (no hay sitio oficial) | ||
|
||
// Esto es un comentario | ||
|
||
/* Esto también es un comentario */ | ||
|
||
#include <iostream> | ||
using namespace std; | ||
|
||
#define constante 1 | ||
|
||
int main(){ | ||
char variable = 'variable'; | ||
const int constant2 = 2; | ||
|
||
int numero = 10; | ||
short numeroCorto = 5; | ||
long numeroLargo = 100000; | ||
long long numeroMuyLargo = 1000000000; | ||
unsigned int numeroPositivo = 100; | ||
|
||
char caracter = 'a'; | ||
char string = 'string'; | ||
wchar_t letraUnicode = L'Ω'; | ||
|
||
bool verdad = true; | ||
bool falso = false; | ||
|
||
float flotante = 1.2f; | ||
double float_largo = 1.22222222; // 15 decimales o menos | ||
long double numeroLargoDoble = 3.14159265358979323846L; | ||
|
||
cout << "¡Hola, C++!"; | ||
return 0; | ||
} |
34 changes: 34 additions & 0 deletions
34
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/c++/andreessj.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* EJERCICIO : Crea un comentario en el código y coloca la URL del sitio web oficial del | ||
lenguaje de programación que has seleccionado.Representa las diferentes sintaxis que existen de crear comentarios | ||
en el lenguaje(en una línea, varias...) | ||
.Crea una variable(y una constante si el lenguaje lo soporta) | ||
.Crea variables representando todos los tipos de datos primitivos del lenguaje(cadenas de texto, enteros, booleanos...) | ||
.Imprime por terminal el texto : "¡Hola, [y el nombre de tu lenguaje]!" */ | ||
|
||
#include <iostream> | ||
#include <stdio.h> | ||
|
||
#define MaxValue 256 // Constante | ||
|
||
using namespace std; | ||
|
||
int main() | ||
{ | ||
int value = 3; // enteros | ||
float pi = 3.14; // decimales | ||
bool verdadero = true; // booleanos | ||
bool falso = false; | ||
char letter = 'a'; // de caracter | ||
string hello = "Hola C++!\n"; // cadena de caracteres | ||
|
||
cout << hello; | ||
|
||
system("pause"); | ||
return 0; | ||
} | ||
|
||
/* | ||
comentario | ||
en varias | ||
lineas | ||
*/ |
39 changes: 39 additions & 0 deletions
39
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/c++/carlosguariglia.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// URL del sitio web oficial de C++: https://isocpp.org/ | ||
// Generado por Chatgpt | ||
|
||
// Comentarios en una línea | ||
|
||
/* | ||
Comentarios | ||
en varias | ||
líneas | ||
*/ | ||
|
||
#include <iostream> // Para poder usar std::cout | ||
#include <string> // Para poder usar el tipo std::string | ||
|
||
// Constante (en C++) | ||
const double PI = 3.14159; | ||
|
||
int main() { | ||
// Variables con diferentes tipos de datos primitivos | ||
int numeroEntero = 42; | ||
float numeroDecimal = 3.14f; | ||
double numeroDoble = 2.718281828; | ||
bool esVerdadero = true; | ||
char letra = 'C'; | ||
std::string cadenaDeTexto = "¡Hola, C++!"; | ||
|
||
// Imprimir por terminal | ||
std::cout << "¡Hola, C++!" << std::endl; | ||
|
||
// Imprimir el valor de las variables | ||
std::cout << "Número Entero: " << numeroEntero << std::endl; | ||
std::cout << "Número Decimal (float): " << numeroDecimal << std::endl; | ||
std::cout << "Número Doble (double): " << numeroDoble << std::endl; | ||
std::cout << "Booleano: " << (esVerdadero ? "Verdadero" : "Falso") << std::endl; | ||
std::cout << "Carácter: " << letra << std::endl; | ||
std::cout << "Cadena de Texto: " << cadenaDeTexto << std::endl; | ||
|
||
return 0; | ||
} |
32 changes: 32 additions & 0 deletions
32
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/c++/oixild.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
|
||
// WEBSITE> https://isocpp.org/ | ||
|
||
// Code comments can be made by different ways : | ||
|
||
// Line Comment | ||
|
||
/* | ||
Block | ||
Comment | ||
*/ | ||
#include <iostream> | ||
|
||
void varConstVar() { | ||
int var = 1; | ||
const int constVar = 2; | ||
} | ||
|
||
void primitiveData() { | ||
int a = 0; | ||
float b = 1.5; | ||
double float c = 2.5; | ||
char d = 'a'; | ||
bool e = true; | ||
wchar_t f = L'C'; | ||
} | ||
|
||
int main() { | ||
std::cout << "¡Hola, [C++]!" << std::endl; | ||
return 0; | ||
} |
42 changes: 42 additions & 0 deletions
42
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/c++/whiterunjarl.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#include <iostream> | ||
using namespace std; | ||
|
||
// la web oficial es: https://isocpp.org/ | ||
|
||
/* otra forma de | ||
comentar */ | ||
|
||
//comentario de una linea | ||
|
||
|
||
int vida = 52; | ||
string perros = "doce"; | ||
double flotante = 22; | ||
char letra = 'N'; | ||
bool falsito = false; | ||
string lenguaje = "C++"; | ||
|
||
|
||
int numeroBalas = 25, armorTotal = 78, hpLeft = 62; | ||
const int miConstante = 12; | ||
|
||
|
||
|
||
|
||
int main() | ||
{ | ||
cout << "esto anda de 10" << ", Test si funciona" << endl; | ||
cout << "La vida int es: " << vida << endl; | ||
cout << "El string total de perros es: " << perros << endl; | ||
cout << "el numero float es: " << flotante << endl; | ||
cout << "La letra es: " << letra << endl; | ||
cout << "El booleano es: " << falsito << endl; | ||
cout << "Lo siguiente suma los valores de: numerosBalas, armorTotal y hpLeft \nestadisticas de un juego por ejemplo." << endl; | ||
cout << "La suma de los ints es: " << numeroBalas + armorTotal + hpLeft << endl; | ||
cout << "mi constante es:" << miConstante << endl; | ||
cout << "Hola, mi lenguaje es: " << lenguaje << ", y estoy encantado de ir aprendiendo." << endl; | ||
return 0; | ||
|
||
} | ||
|
||
|
29 changes: 29 additions & 0 deletions
29
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/c/1ceL4nc3.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
https://www.cprogramming.com | ||
|
||
Types of comments | ||
// // = // comment // | ||
/* */ = /* comment */ | ||
|
||
// constant value = const + type of variable + name of variable // | ||
const int n = 5; | ||
|
||
//Data types // | ||
char character = 'a'; // Single character, 1 byte // | ||
int integer = 9; // Signed integer in base 10, 4 bytes// | ||
float decimal = 1.5; // Floating point number with six digits of precision, 4 bytes // | ||
double decimalDouble = -2456.4452; // Hold about 15 to 16 digits after and before any given decimal point, 8 bytes // | ||
long longinteger = 132344546L; // Signed long integer, 4 bytes // | ||
short shortinteger = 128; // Short signed integer, 2 bytes // | ||
unsigned unsignedinteger = 50; // Unsigned integer in base 10, 4 bytes // | ||
unsigned long unsignedlonginteger = 451345245UL; // Unsigned long long integer, 8 bytes // | ||
unsigned short unsignedshortinteger = 256; // Short unsigned integer, 2 bytes // | ||
|
||
#include <stdio.h> // header function | ||
|
||
int main() // main function | ||
{ // indicates the beginning and end of functions and other code blocks // | ||
char l_name = 'C'; // create a variable named l_name and assign it the character C // | ||
|
||
printf("!Hola %c!\n", l_name); // print the string !Hola + variable l_name// // %c indicates that the funtion is printing a character// // \n print another line// | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/c/d1d4cum.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include <stdio.h> | ||
#include <stdbool.h> | ||
|
||
// https://www.w3schools.com/c/index.php | ||
// Comentario de una sola línea | ||
/* | ||
Comentario | ||
de varias | ||
líneas | ||
*/ | ||
|
||
int age = 28; | ||
const char letter = 'D'; | ||
|
||
// Tipos de datos | ||
char caracter = 'A'; | ||
int numero = 10; | ||
float decimalPequeño = 10.191283; | ||
double decimalGrande = 10.192845671829345; | ||
bool boolean = true; | ||
|
||
int main() { | ||
printf("¡Hola, C!\n"); | ||
printf("%c\n", caracter); | ||
printf("%d\n", numero); | ||
printf("%f\n", decimalPequeño); | ||
printf("%.1f\n", decimalPequeño); | ||
printf("%.2f\n", decimalPequeño); | ||
printf("%lf\n", decimalGrande); | ||
printf("%.1lf\n", decimalGrande); | ||
printf("%.2lf\n", decimalGrande); | ||
|
||
return 0; | ||
} |
Oops, something went wrong.