Jump to content

signos em pascal


dariop
 Share

Recommended Posts

Dá para se fazer com um case, tem-se é que aldrabar um bocado..

Já não me lembro bem da sintaxe do case do pascal, portanto posso estar a aldrabar um bocado, mas a lógica seria esta.

function tentar(d,m:integer):integer;
begin
if (d<=21) then tentar:=m
else tentar:=m+1;
end;

.....

case tentar(dia,mes) of
1: writeln('1º signo');
2: writeln('2º signo');
...
end;

Se mudam sempre no dia 21, pode ser resolvido assim.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.