Skip to content

Commit 2b4bcf6

Browse files
authored
Merge branch 'main' into mi-reto-00
2 parents f213a1e + fa79fae commit 2b4bcf6

File tree

82 files changed

+8827
-1063
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+8827
-1063
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
//este lenguaje no tiene web oficial
2+
//comentario de una linea
3+
/*
4+
comentario de varias lineas
5+
todos los valres de bits que se ponen pueden ser variables dependiendo del compilador y arquitectura
6+
¿hey brais puedes compartir los playlists de rock que usas para tus directos?
7+
8+
este es el valor maximo que se puede representar con respecto a los bit que se maneja unsigned
9+
8 bits (1 byte) = 255
10+
16 bits (2 bytes) = 65,535
11+
32 bits (4 bytes) = 4,294,967,295
12+
64 bits (8 bytes) = 18,446,744,073,709,551,615
13+
14+
signed se puede manejar en estos rangos
15+
8 bits (1 byte) = -128 a 127
16+
16 bits (2 bytes) = -32,768 a 32,767
17+
32 bits (4 bytes) = -2,147,483,648 a 2,147,483,647
18+
64 bits (8 bytes) = -9,223,372,036,854,775,808 a 9,223,372,036,854,775,807
19+
20+
los valores de c++ son automaticamente signed
21+
22+
*/
23+
#include <iostream>
24+
#include <string>
25+
using namespace std;
26+
27+
int main() {
28+
const string constante = "C++";
29+
string variable = "¡Hola, ";
30+
31+
//hay diferentes valores numericos
32+
short corto = 65524;//este es de 16 bits
33+
int entero = 4294967294;//este es de 32 bits o 16 bits dependiendo del compilador
34+
long largo = 4294967294;//este es de 32 bits
35+
long long gigante = 18446744073709551614;//este es de 64 bits
36+
37+
float flotante = 3.141592;
38+
double doble = 3.141592653589793;
39+
long double giganteDoble = 1.000000000000001;
40+
float scientifico = 6.02E23; //el float también puede usar notación cientifica
41+
42+
//también se pueden declarar los valores sin signo
43+
unsigned short cortoSinSigno = 65535;
44+
//también está el constexpr que es un valor que se va a calcular mientras se conpila no mientras se corre
45+
constexpr float PI = 3.14159265358979323846;
46+
//y se puede usar el auto que lo detecta automatico
47+
auto autoDetectado = 3;
48+
49+
//hay diferentes valores de texto
50+
char caracter = 'a';
51+
string texto = "Hola, C++";
52+
char ascii = 65; //el char también puede ser un valor ascii
53+
54+
//y está el bool
55+
bool booleano = true;
56+
57+
cout << texto;
58+
return 0;
59+
}
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
// https://docs.oracle.com/en/java/javase/21/
2+
3+
/**
4+
* This is a javadoc comment
5+
* @author Kronstadtlambda
6+
* @version 1.0
7+
*/
8+
9+
// here define the package name
10+
// package roadmap.java.r00;
11+
12+
// here import the necessary library (optional)
13+
import java.util.Random;
14+
15+
/**
16+
* Class to show the basic sintax and others of Java programming language
17+
*/
18+
public class KronstadtLambda {
19+
/**
20+
* Main method to execute the code of this class (entry point)
21+
*/
22+
public static void main(String[] args) {
23+
24+
// Sintax to create comments:
25+
// This is a single line comment
26+
/* This is a multi-line comment
27+
* or more lines
28+
*/
29+
30+
// Sintax to manage puntuation:
31+
// ; -> end of the statement.
32+
// {} -> delimit block of code.
33+
// () -> parameters, conditions, group expressions.
34+
// [] -> declare arrays, [index] access to elements.
35+
// . -> access to methods, attributes, etc.
36+
// @ -> annotations.
37+
// :: -> method reference (functional programming).
38+
39+
// Variables and constants
40+
float variable_high;
41+
final float CONSTANT_COULUMB;
42+
variable_high = 1.7f; //meters
43+
CONSTANT_COULUMB = 8.9875517873681764e9f; // N m^2 C^-2
44+
45+
// Primitive data types
46+
byte v_byte; // Integer 8 bits
47+
short v_short; // Integer 16 bits
48+
int v_int; // Integer 32 bits
49+
long v_long; // Integer 64 bits
50+
float v_float; // Floating point 32 bits
51+
double v_double; // Floating point 64 bits
52+
char v_char; // Unicode character 16 bits
53+
boolean v_boolean; // Logical 8 bits
54+
55+
v_byte = 127;
56+
v_short = 32767;
57+
v_int = 2147483647;
58+
v_long = 9223372036854775807L;
59+
v_float = 3.4028235e38f;
60+
v_double = 1.7976931348623157e308;
61+
v_char = 'K';
62+
v_boolean = true;
63+
64+
System.out.println("A byte: " + v_byte);
65+
System.out.println("A short: " + v_short);
66+
System.out.println("An int: " + v_int);
67+
System.out.println("A long: " + v_long);
68+
System.out.println("A float: " + v_float);
69+
System.out.println("A double: " + v_double);
70+
System.out.println("A char: " + v_char);
71+
System.out.println("A boolean: " + v_boolean);
72+
73+
// Print a greeting
74+
String v_language = "Java";
75+
System.out.println("Hello, " + v_language + "!");
76+
77+
// Style guide
78+
/*
79+
* Nomenclature:
80+
* Use PascalCase for class names and interface names.
81+
* Use camelCase for method and variables names.
82+
* UPPER_CASE for constants.
83+
*
84+
* Comentary:
85+
* Use comentary to explain the code, not what the code does.
86+
*
87+
* Code organization:
88+
* Use a maximum of 80 characters per line.
89+
* Use 4 spaces to indent code and avoid using tabs.
90+
*
91+
* Declaration:
92+
* Group the declarations of variables at the beginning of the class.
93+
*/
94+
95+
} // end of the main method
96+
} // end of the class
97+
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
//https://www.java.com/es/
2+
3+
// comentarios en una sola linea
4+
/*
5+
* commentarios en
6+
* varias lineas
7+
*/
8+
9+
10+
11+
public class MaynorSemeyá {
12+
13+
public static void main(String[] args) {
14+
15+
16+
byte primerVariable =1 ; /* representa un tipo de dato de 8 bits con signo
17+
*puede almacenar valores numericos en el rango de -128 a 127
18+
*/
19+
20+
short seguandaVariable = 2;
21+
/* este utiliza 16 bits con signo puede almacenar valores numericos
22+
* en el rango de -32768 a 37767
23+
*/
24+
25+
int terceraVariable = 258;
26+
/*es un tipo de dato que utiliza 64 bits con signo y puede
27+
* almacenar valores numericos en el rango de -9223372036854775808 a 9,223,372,036,854,775,807
28+
*/
29+
30+
float cuartaVariable = 8;
31+
/*es un tipo de dato diseñado para almacenar nùmeros en coma flotante
32+
* con precision simple de 32 bits
33+
*/
34+
35+
double quintaVariable = 25.5;
36+
/*este tipo de dato almacenta numeros en coma flotante con doble precision
37+
* de 64 bits, lo que proporciona una mayor precision que float
38+
*/
39+
40+
boolean sextaVariable = true ;
41+
/*define tipos de datos booleanos que pueden tener dos valores
42+
* true o false
43+
*/
44+
45+
char septimaVariable = 'j';
46+
/*es un tipo de datos que representa un caracter unicode sencillo
47+
* de 16 bits
48+
*/
49+
50+
System.out.println("Hola java!!");
51+
52+
53+
}
54+
55+
56+
57+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// https://www.java.com/es/
2+
3+
//Crear un comentario en una sola línea
4+
5+
/*Crear comentario
6+
en varias líneas*/
7+
8+
// Crea una variable (y una constante si el lenguaje lo soporta).
9+
10+
String miVariable = "Crear una variable en java";
11+
12+
// Crear una constante en java
13+
14+
static final double numero_PI = "3.14159";
15+
16+
/* Crea variables representando todos los tipos de datos primitivos
17+
del lenguaje (cadenas de texto, enteros, booleanos...). */
18+
19+
String texto = "Nombre"
20+
int numeroEntero = 1;
21+
double numeroDecimal = 2.14;
22+
char unSoloCaracter = 'A';
23+
boolean verdadero = True;
24+
boolean falso = False;
25+
26+
// Imprime por terminal el texto: "¡Hola, [y el nombre de tu lenguaje]!"
27+
28+
public class HolaJava {
29+
public static void main (String[] args) {
30+
System.out.println("¡Hola, Java!");
31+
}
32+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
public class vikinghost {
2+
3+
public static void main(String[] args) {
4+
5+
//Este es el enlace a la web de java = https://www.java.com/es/
6+
7+
//comentario de una linea
8+
9+
/*comentario
10+
de bloque*/
11+
12+
/**
13+
* Comentario de documentación.
14+
*/
15+
16+
//Crea una variable y una constante.
17+
18+
short variableInicial;
19+
20+
21+
final int value = 234;
22+
23+
//Recogidos los tipos primitivos
24+
String texto = "cadena de texto";
25+
byte num0 = -128;
26+
short num1= 3;
27+
int num2= 2;
28+
long num3 = 92211703;
29+
float num4 = 2.1233f;
30+
double num5 = 3.222232;
31+
char caract = 'a';
32+
boolean value2 = true;
33+
34+
//Imprime por terminal el texto: "¡Hola, [y el nombre de tu lenguaje]!"
35+
36+
System.out.println("Hola, Java!");
37+
}
38+
39+
40+
}
41+
42+
43+
44+
45+
46+
47+
48+
49+
50+
51+
52+
53+
54+
55+
56+
57+
58+
59+
60+
61+
62+
63+
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/************ 1 - SITIO OFICIAL DE JAVASCRIPT ************/
2+
3+
// Pagina que encontre muy completa de JS, con la que me saco las dudas. Me parece que no tiene una oficial. https://developer.mozilla.org/en-US/docs/Learn/JavaScript
4+
5+
/*********************************************************/
6+
7+
/************ 2 - TIPOS DE COMENTARIOS ************/
8+
9+
// Para colocar un comentario en 1 sola linea.
10+
11+
/* Para comentar
12+
en varias
13+
lineas */
14+
15+
/**************************************************/
16+
17+
/************ 3 - CREANDO VARIABLES ************/
18+
var variableVar = "Una variable usando VAR"; //Desde hace años, ya no se recomienda usar VAR
19+
let variableLet = "Una variable usando LET";
20+
const CONSTANTE = "Una constante";
21+
/***********************************************/
22+
23+
/************ 4 - TIPOS DE DATOS PRIMITIVOS ************/
24+
let tipoCadena = "Hola, soy una cadena de texto";
25+
//Los de tipo number pueden ser enteros o decimales
26+
let tipoNumber = 42;
27+
tipoNumber = 42.5;
28+
let tipoBooleano = true;
29+
let tipoIndefinido = undefined;
30+
let tipoSimbolo = Symbol("mySymbol");
31+
let tipoBigInt = 1234567890123456789012345678901234567890n;
32+
let tipoNulo = null; //Aunque algunos ejemplos lo clasifican como primitivo, en la documentación de Mozilla (https://developer.mozilla.org/es/docs/Glossary/Primitive) se indica que es un "caso especial".
33+
/*******************************************************/
34+
35+
/************ 5 - HOLA, JAVASCRIPT ************/
36+
console.log("¡Hola, JavaScript!");
37+
/**********************************************/

0 commit comments

Comments
 (0)