IWimv2m.jpg
  • Pio
    #19912
    Ha már PC humor topik...

    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 Attack;

    begin
      Lud.Caption:='Lúd';
      Lud.Strength:=10;
      Diszno.Caption:='Disznó';
      Diszno.Strength:=540;
      Attack(Lud, Diszno, 1, 1 );
      Attack(Lud, Diszno, 20, 1 );
      Attack(Lud, Doszno, 60, 1 );
    end;