martes, 27 de agosto de 2019

estructura de control

                              Estructura de control

                                                           IF

(condicion )
instruccion1
instruccion 2

if (a>b)
>=
<=
<
== 

if (condicion)
{
instrucciones
}
if (a>b) && (b>c)
   (a>b) || (b>c)

                                                    IF ELSE

if (condicion)
{
instrucciones
}
else
   instruccion
           

                                                       FOR

For (j=0; j<=10; j++)
{
cout << "hola";
}

INCREMETO ++
DECREMENTO --

Estructura de control que permite que una o varias instrucciones con las llaves.

                                                  SWITCH

switch (a) int

case 1
instruccion
break
case 2
instruccion
break

default

switch (a) int

case 1
instruccion
break
case 2
instruccion
break

default
                                                     WHILE

while (instruccion)

No hay comentarios.:

Publicar un comentario