Dze je subor www.TrSek.com/zadania/vaha.pas{ VAHA.PAS Copyright (c) Ludovit Mydla }
{ Vypocita ci mas nadvahu }
{ Vstup : vyska a hmotnost }
{ Vystup: slovne zhodnotenie vahy }
{ }
{ Datum:11.08.2004 http://www.trsek.com }
program SpravnaVaha;
uses crt;
var v,m:integer;
i:real;
begin
clrscr;
WriteLn('Program vypocita ci mas nadvahu');
Write('Kolko vazis?: '); ReadLn(v);
Write('Kolko merias?: ');ReadLn(m);
i:=(m-110)/v;
if (i< 0.75) Then Writeln('Mas nadvahu.');
if (i>=0.75) and (i< 0.9 ) Then Writeln('Mas slabu nadvahu.');
if (i>=0.9 ) and (i<=1.1 ) Then WriteLn('Si OK.');
if (i> 1.1 ) and (i<=1.25) Then Writeln('Trpis slabou anorexiou.');
if (i> 1.25) Then Writeln('Trpis anorexiou.');
ReadLn;
end.