C++ programa de manual
V´ ıctor Mu˜oz n
Contenidos
1 Introducci´n o 2 Estructura b´sica de un programa a 2.1 El programa m´s simple . . . . . a 2.2 Definici´n de funciones . . . . . . o2.3 Nombres de variables . . . . . . . 2.4 Tipos de variables . . . . . . . . . 2.5 Ingreso de datos desde el teclado 2.6 Operadores aritm´ticos . . . . . . e 2.7 Operadores relacionales . . . . . .2.8 Asignaciones . . . . . . . . . . . . 2.9 Conversi´n de tipos . . . . . . . . o 3 Control de flujo 3.1 if, if... else, if... 3.2 Expresi´n condicional . . o 3.3 switch . . . . . . . . . . 3.4 while .. . . . . . . . . 3.5 for . . . . . . . . . . . . 3.6 do... while . . . . . . 3.7 goto . . . . . . . . . . . en . . . . . . . . . . . . . . . . . . C++ . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . 3 3 3 4 4 4 6 6 7 7 8 9 9 10 10 11 11 12 12 12 12 12 13 15
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . .. . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . .
else if . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . .
.. . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .. . . . . . .
. . . . . . .
4 Funciones 4.1 Funciones tipo void . . . 4.2 return . . . . . . . . . . . 4.3 Funciones con par´metros a 4.4 Par´metros default . . . . a
. . . .
. . . . 1. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .4.5 4.6
Alcance, visibilidad, tiempo de vida . . . . . . . . . . . . . . . 16 Recursi´n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 o 17 17 18 19 19 20 20 21 23 23 24 25 26 26...
Regístrate para leer el documento completo.