• Lenguaje

    PSeInt (Pseudocódigo)

  • Descripción

    Dado como datos la temperatura en grados Fahrenheit y un continente, determine qué tipo de árbol es recomendable para la reforestación.
    Temperatura | Continente | Tipo de árbol
    85 | América o Europa | Palma de cera
    Entre 85 y 70 | Europa o Asia | Cedro
    Entre 70 y 32 | América | Roble
    Entre 32 y 10 | Oceanía | Pino
    Menor igual a 10 | África | Eucalipto

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Proceso TipoDeArbolParaReforestacion
    Escribir Sin Saltar "Ingresa el valor de temperatura:";
    Leer temperatura;
    Escribir "Selecciona el valor de continente.";
    Escribir "    1.- África";
    Escribir "    2.- América";
    Escribir "    3.- Asia";
    Escribir "    4.- Europa";
    Escribir "    5.- Oceanía";
    Escribir Sin Saltar "    :";
    Repetir
        Leer continente;
        Si continente<1 O continente>5 Entonces
            Escribir Sin Saltar "Valor incorrecto. Ingrésalo nuevamente.: ";
        FinSi
    Hasta Que continente>=1 Y continente<=5;
    Si temperatura = 85 Y (continente = 2 O continente = 4) Entonces
        Escribir "Palma de cera";
    FinSi
    Si temperatura<=85 Y temperatura>=70 Y (continente = 4 O continente = 3) Entonces
        Escribir "Cedro";
    FinSi
    Si temperatura<=70 Y temperatura>=32 Y continente = 2 Entonces
        Escribir "Roble";
    FinSi
    Si temperatura<=32 Y temperatura>=10 Y continente = 5 Entonces
        Escribir "Pino";
    FinSi
    Si temperatura<=10 Y continente = 1 Entonces
        Escribir "Eucalipto";
    FinSi
FinProceso