You are on page 1of 3

program zodiak;

uses wincrt;

var name : string;

x,D, M, Y : integer;

day, zodiac: string;

begin

writeln('Birth ''Day'' Program');

write('Your name : ');

readln(name);

write('Your birth date : ');

read(D,M,Y);

if((D>=21) and (M=1))or((D<=19)and (M=2)) then

zodiac:='Aquarius';

if((D>=20) and (M=2))or((D<=20)and (M=3)) then

zodiac:='Pisces';

if((D>=21) and (M=3))or((D<=20)and (M=4)) then

zodiac:='Aries';

if((D>=21) and (M=4))or((D<=22)and (M=5)) then

zodiac:='Taurus';

if((D>=23) and (M=5))or((D<=21)and (M=6)) then

zodiac:='Gemini';

if((D>=22) and (M=6))or((D<=22)and (M=7)) then


zodiac:='Cancer';

if((D>=23) and (M=7))or((D<=22)and (M=8)) then

zodiac:='Leo';

if((D>=23) and (M=8))or((D<=23)and (M=9)) then

zodiac:='Virgo';

if((D>=24) and (M=9))or((D<=22)and (M=10)) then

zodiac:='Libra';

if((D>=23) and (M=10))or((D<=21)and (M=11)) then

zodiac:='Scorpio';

if((D>=22) and (M=11))or((D<=22)and (M=12)) then

zodiac:='Sagitarius';

if((D>=23) and (M=12))or((D<=20)and (M=1)) then

zodiac:='Capricorn';

x:=(2010-Y)*365+(11-M)*30+(5-D);

while(Y<2010) DO BEGIN

Y:=Y+4;

x:=x+1;

END;

x:=x mod 7;

case x of

0: day:='thursday';

1: day:='friday';

2: day:='saturday';

3: day:='sunday';
4: day:='monday';

5: day:='tuesday';

6: day:='wednesday';

end;

writeln(name, ' your birthdate is ' , day,' and your zodiac is' , zodiac);

readln;

end.

You might also like