viernes, 23 de agosto de 2019

Estucturas de control

If

if(condicion)
if(condicion)
{
instrucciones;
}
if(condicion)
instruccion1;
instruccion 2; 

   if
(a>b)
  >=
  <=
  !=
  ==
if(a>b)&&(b>c)
if(a>b)||(b>c)



If-Else
if(condicion)
{
}
else
instruccion;
if(condicion)
(>,<,>=,<=,!=,==)&&(condicion)



Switchs

Switch (a)
{case 1: Instrucciones;
                     break;
case 2: Instrucciones;
                     break;
case 3: Instrucciones;
                     break;
default: instrucciones;

                                For

For (J=0;J=10;J++)
{Cout<<"HOLA";

}
For(J=10;J>=0;J--)

While

while (instruccion)

Do -While

 Do While(instruccion)

No hay comentarios.:

Publicar un comentario