Jump to content

Recommended Posts

Posted

Ξέρω ότι είναι παλιό...απλώς ο φίλος μας το τοποθέτησε στην σωστή θέση.

Posted

program hlikia;

uses crt;
var
ypol,tr_etos,tr_minas,tr_mera,gen_etos,gen_minas,gen_mera,il_eth,il_mines,il_imeres:integer;
syn_trexon,syn_gen,syn:LongInt;
BEGIN
write('Δώσε το τρέχων έτος, μήνα, ημέρα: ');
readln(tr_etos,tr_minas,tr_mera);
write('Δώσε το έτος, μήνα, ημέρα που γεννήθηκες: ');
readln(gen_etos,gen_minas,gen_mera);
syn_trexon:=(365*tr_etos)+(30*(tr_minas-1))+tr_mera;
syn_gen:=(365*gen_etos)+(30*(gen_minas-1))+gen_mera;
syn:=syn_trexon-syn_gen;
il_eth:=syn div 365;
ypol:=syn mod 365;
il_mines:=ypol div 30;
il_imeres:=ypol mod 30;
writeln('Ετών: ',il_eth,' Μηνών: ',il_mines,' Ημερών: ',il_imeres);
END.

 

 

Σύμφωνα με αυτό, είμαι:

Ετών: 17 Μηνών: 2 Ημερών: 16

Guest
This topic is now closed to further replies.



×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and 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..