Dze je subor www.TrSek.com/cover/benkovic/vytah.pas
{ VYTAH.PAS                              Copyright (c) Jan Benkovic }
{ Vypocet nosnosti vytahu. Zadas pocet ludi.                        }
{                                                                   }
{ Datum:12.03.2000                             http://www.trsek.com }

program vytah;
uses crt;

var
 nosnost,vaha,ludi,a,b : longint;

begin
 clrscr;
 Write('Napis nosnost vytahu : ');
 Readln(nosnost);
 Write('Naspi pocet ludi, ktory sa budu viest : ');
 Readln(ludi);
 for a := 1 to ludi do
  begin
   Write('Naspis vahu ',a,' cloveka : ');
   Readln(vaha);
   b:=b+vaha;
  end;
 if b < nosnost then Writeln('Vytah nespadne')
 else if b=nosnost then Writeln('Vyjde to akurat')
      else Writeln('Vytah spadne');
 readkey;
end.

Copyrigth by Zdeno Sekerak 2007, http://www.trsek.com