jueves, 22 de agosto de 2019

Estructuras De Control

if
if(condicion)
{
intrucciones;
}

if(a>b)&&(b>c)
if(a>b)||(b>c)



if-else



if(condición)
{
Instrucciones;
}
else
{
 Instrucciones;

}

for



for(int i = valor inicial; i <= valor final; i = i + paso)
{
Instrucciones;
}

switch



switch(opción)
{
    case 1= instrucciones;
    break;
    case 2= instrucciones;
    break;
    case 3=instrucciones;
    break;
    default: instrucciones;
}

while



while(condición)
{
Instrucciones;
}
do-while
do
{
 Instrucciones;
}
while(condición);

No hay comentarios.:

Publicar un comentario