Calculate your excess weight or anorexia
Delphi & Pascal (česká wiki)
Category: Homework in Pascal
Author: Ludovit Mydla
Program: Vaha.pas
File exe: Vaha.exe
Author: Ludovit Mydla
Program: Vaha.pas
File exe: Vaha.exe
Calculate your excess weight or anorexia.
{ 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.