Skip to content

Commit 34336a2

Browse files
authored
Merge pull request #9064 from m-hadz/reto-00-c++
#00 - c++
2 parents 5b2403a + 49b481b commit 34336a2

File tree

1 file changed

+33
-0
lines changed
  • Roadmap/00 - SINTAXIS, VARIABLES, TIPOS DE DATOS Y HOLA MUNDO/c++

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#include <iostream>
2+
3+
// https://isocpp.org
4+
5+
// Se usa para comentarios de una linea
6+
7+
/*
8+
* Se utiliza para comentarios
9+
* de multiples lineas
10+
*/
11+
12+
char variable = 'e';
13+
14+
const double constante = 3.14;
15+
16+
// Estos son los tipos de datos primitivos de c++
17+
18+
char caracter = 'h';
19+
20+
int entero = 9;
21+
22+
float flotante = 3.1;
23+
24+
double doble = 3.123;
25+
26+
bool booleano = true;
27+
28+
// Para imprimir se utiliza el objeto std::cout
29+
30+
int main () {
31+
std::cout << "¡Hola, C++!" << std::endl;
32+
return 0;
33+
}

0 commit comments

Comments
 (0)