• Lenguaje

    Pascal

  • Descripción

    Permite leer la fecha de nacimiento de una persona (fecha válida), e indica su signo zodiacal acompañado del horóscopo.

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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
program SignoZodiacalYHoroscopo;
uses crt;

var dia, mes : integer;
begin
    write ('Ingresa el valor de dia: ');
    readln (dia);
    write ('Ingresa el valor de mes: ');
    readln (mes);
    if ((dia>=21) and (mes=3)) or ((dia<=20) and (mes=4)) then
        begin
            writeln ('Signo: Aries');
            writeln ('Hor'#162'scopo: Escribe el hor'#162'scopo aqu'#161'.');
        end;
    if ((dia>=24) and (mes=9)) or ((dia<=23) and (mes=10)) then
        begin
            writeln ('Signo: Libra');
            writeln ('Hor'#162'scopo: Escribe el hor'#162'scopo aqu'#161'.');
        end;
    if ((dia>=21) and (mes=4)) or ((dia<=21) and (mes=5)) then
        begin
            writeln ('Signo: Tauro');
            writeln ('Hor'#162'scopo: Escribe el hor'#162'scopo aqu'#161'.');
        end;
    if ((dia>=24) and (mes=10)) or ((dia<=22) and (mes=11)) then
        begin
            writeln ('Signo: Escorpio');
            writeln ('Hor'#162'scopo: Escribe el hor'#162'scopo aqu'#161'.');
        end;
    if ((dia>=22) and (mes=5)) or ((dia<=21) and (mes=6)) then
        begin
            writeln ('Signo: Geminis');
            writeln ('Hor'#162'scopo: Escribe el hor'#162'scopo aqu'#161'.');
        end;
    if ((dia>=23) and (mes=11)) or ((dia<=21) and (mes=12)) then
        begin
            writeln ('Signo: Sagitario');
            writeln ('Hor'#162'scopo: Escribe el hor'#162'scopo aqu'#161'.');
        end;
    if ((dia>=21) and (mes=6)) or ((dia<=23) and (mes=7)) then
        begin
            writeln ('Signo: Cancer');
            writeln ('Hor'#162'scopo: Escribe el hor'#162'scopo aqu'#161'.');
        end;
    if ((dia>=22) and (mes=12)) or ((dia<=20) and (mes=1)) then
        begin
            writeln ('Signo: Capricornio');
            writeln ('Hor'#162'scopo: Escribe el hor'#162'scopo aqu'#161'.');
        end;
    if ((dia>=24) and (mes=7)) or ((dia<=23) and (mes=8)) then
        begin
            writeln ('Signo: Leo');
            writeln ('Hor'#162'scopo: Escribe el hor'#162'scopo aqu'#161'.');
        end;
    if ((dia>=21) and (mes=1)) or ((dia<=19) and (mes=2)) then
        begin
            writeln ('Signo: Acuario');
            writeln ('Hor'#162'scopo: Escribe el hor'#162'scopo aqu'#161'.');
        end;
    if ((dia>=24) and (mes=8)) or ((dia<=23) and (mes=9)) then
        begin
            writeln ('Signo: Virgo');
            writeln ('Hor'#162'scopo: Escribe el hor'#162'scopo aqu'#161'.');
        end;
    if ((dia>=20) and (mes=2)) or ((dia<=20) and (mes=3)) then
        begin
            writeln ('Signo: Piscis');
            writeln ('Hor'#162'scopo: Escribe el hor'#162'scopo aqu'#161'.');
        end;
    writeln;
    write ('Presiona una tecla para terminar . . . ');
    readkey;
end.