4. DIAGRAMA 4 SENTENCIA 4
//Quiero café
If (¿Hay café hecho?)
{
Cout<<“Calentar café”;
}
Else
{
Cout<<“Hacer café”;
}
Cout<< “Servir en taza y añadr azucar”;
If (¿Está dulce?)
{
Cout<< “Tomar cafe”;
Else
{
Cout<< “Añadir azúcar”;
5. DIAGRAMA 5 SENTENCIA 5
If (A>B)
{
Cout<< “A es mayor que B”;
}
Else
If (A=B)
{
Cout<< “A es igual a B”;
}
Else
{
Cout<< “A es menor que B”;
}
//Fin
6. DIAGRAMA 6 SENTENCIA 6
If (condicion 1)
{
Cout<< “instrucción 1”;
}
Else
If (condicion 2)
Cout<< “instrucción 2”;
{
Else
If (condición 3)
{
Cout<< “instrucción 3”;
}
7. DIAGRAMA 7 SENTENCIA 7
If (A>B)
{
If (A>c)
{
If (B>c)
{
Cout<< “A.B,C”;
}
Else
{
Cout<< “A,C,B”;
}
}
Else
{
Cout<< “C,A,B”;
}
Else
{
If (B>c)
{
If (A>c)
{
Cut<< “B,A,C”;
}
Else
{
Cout<< “B,C,A”;
}
else
{
C,B,A
}
}
}
}
8. DIAGRAMA 8 SENTENCIA 8
If (condicion 1)
{
If (Condicion2)
{
Cout<< “sentencia A”;
}
Else
{
Cout<< “Sentencia B”;
}
else
{
Cout<< “sentencia C”;
}
}
9. DIAGRAMA 9 SENTENCIA 9
If (Numero > 6)
{
Cout<< “Aprueba la materia”;
}
Else
{
Cout<< “No aprueba la materia”;
}
If (Numero >=8)
{
Cout<< “Puede ganar una beca”;
}
//Fin
10. DIAGRAMA 10 SENTENCIA 10
If (Modo por tiempo seleccionado)
{
Cout<< “Dar orden de encender motor”;
Cout<< “encender motor”;
Cout<< “Dar orden de apagar motor”;
Cout<< “ apagar motor”;
}
else
if (Funcionanmiento inicio)
{
Cout<< “ecender motor”;
Cout<< “ Generar retorno en el tiempo ingresado”;
Cout << “apagar el motor”;
}
//Fin