if (condicion) {
// aiusu
} else if (condicion2) {
} else {
}
switch (variable) {
case 1;
// fdgfdg
break;
case 2;
// fdsf
break;
}
while (condicion) {
}
do {
} while (condicion);
for (int i=0 ; i<10 ; i++) {
}
Me_voy_pa_mi_casa nombreFuncion(adsadasd) {
return //valor,
}
// Arrays
int numerosss[5] = {1, 2, 3, 4, 5};
char palabras[7] = "Teclado";
// Arrays multidimensionales
int matriz[3][3] = {
{1, 2, 3},
{3, 4, 5},
{7, 8, 9}
};
// Punteros
int numero = 42;
int* puntero = №
printf("Valor: ");
// Operadores Aritmeticos
int suma = 5 + 3; // =8
int resta = 5 - 3; // = 2
int multiplicacion = 5 * 3; // 15
int division = 15 / 3;
int modulo = 5 % 3;
// Operadores de Comparacion
int igualdad = (5 == 3);
int diferencia = (5 != 3);
int mayor = (5 > 3);
int menor = (5 < 3);
int mayor = (5 >= 3);
int menor = (5 <= 3);
// Operadores Logicos
int and = (1 && 1);
int or = (1 || 0);
int not = !1;
int XX = 10;
// Operadores de asignacion
XX += 3; // XX = XX + 3
XX -= 2; // XX = XX - 2
XX *= 4; // XX = XX * 4
XX /= 2;
XX %= 3; // XX = XX % 3
// Enteros
int entero = 42.2;
short numeroCorto = 123; // -32768 a 32768
long numeroLargo = 123123123; // -922000000000000000000 a 9220000000000000
unsigned int sinSignos = 123; // 0 a
// Decimales
float decimal = 3.14;
double decimalDoble = 3.14159;
// Caracteres
char caracter = 'A';
char caracterCadena[] = "Hello";
bool Realidad = true;
#include <stdbool.h>
#include <stdio.h>
// Funcion Principal
int main() {
// Codigo para la impresion
printf("Hola Mundo");
return 0;
}
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}