Kozmondasok programnyelven:
-----------------------------------------------------------
while (state(Korso) != BROKEN) go (Korso, &Kut);
set_quality(Aratas, get_quality(Vetes));
-----------------------------------------------------------
if (origin(Horse) == SOUVENIR)
Allow_Look_At.Teeth = 0;
-----------------------------------------------------------
if (bride_ID == most_beautiful(GetAllGirls
(THIS_VILLAGE)))
exit(-1);
-----------------------------------------------------------
if (TimeToInt(Wakeup.Time) < TimeToInt(StrToTime
(''06:00:00'')))
AddToList(UserLoggedIn.FoundItems, Gold);
-----------------------------------------------------------
Function May_I_Marry_Her(Girl: TGirl): boolean;
begin
With Girl.Mother do
May_I_Marry_Her := ((Body.Quality=''attractive'') and
(face.Quality = ''beautiful''));
end;
-----------------------------------------------------------
type TEmployed = class(THuman);
Job: String[30];
procedure OnGraveDigging (Sender: Tobject);
private
{ Private declarations }
public
{ Public declarations }
end;
Procedure TEmployed.OnGraveDigging (Sender: Tobject);
begin
Sender.Job := ''GraveDigger'';
end;
-----------------------------------------------------------
Const Num_Of_Dog_Buying_In_Buda = 1;
-----------------------------------------------------------
uses animals;
var lud, diszno: TAnimal;
Procedure Attack(A, B: TAnimal; NumA, NumB: Word);
begin
If NumA * A.Strength > NumB * B.Strength then write
(A.Caption)
else if NumA * A.Strength < NumB * B.Strength then
write(B.Caption)
else write('Nobody');
writeln(' won');
end;
begin
Lud.Caption:='Lud';
Lud.Strength:=10;
Diszno.Caption:='Diszno';
Diszno.Strength:=540;
Attack(Lud, Diszno, 1, 1);
Attack(Lud, Diszno, 20, 1);
Attack(Lud, Doszno, 60, 1);
end.
F9 (Run)
Result:
Diszno won.
Diszno won.
Lud won.
Megoldasok:
/* Addig jar a korso a kutra, amig el nem torik */
/* Ki mint vet, ugy arat */
/* Ajandek lonak ne nezd a fogat */
/* Soha ne a falu legszebb lanyat vedd felesegul! */
/* Ki koran kel, aranyat lel */
/* Nezd meg az anyjat, vedd el a lanyat */
/* Aki masnak vermet as, az a siraso */
/* Egyszer volt budan kutyavasar */
/* Sok lud disznot gyoz */
''A kő-papír-olló játék nagyon unalmas volt a papír és az olló feltalálásig.''