Výpočet BMI - Body Mass Index
Delphi & Pascal (česká wiki)
Category: KMP (Club of young programmers)
Author: RaptoR
Program: Bodymass.pas
File exe: Bodymass.exe
Author: RaptoR
Program: Bodymass.pas
File exe: Bodymass.exe
Výpočet BMI - Body Mass Index
{ BODYMASS.PAS } { Vypocet BMI. } { } { Author: RaptoR } { Date : 6.1.2009 http://www.trsek.com } program BodyMass; uses crt; var bmi,a,vyska,vaha,b:real; BEGIN clrscr; writeln('-------------'); writeln('|VYPOCET BMI|'); writeln('-------------'); writeln; writeln('Zadaj svoju vysku v cm'); readln(a); vyska:=a/100; writeln; writeln('Zadaj svoju vahu v kg'); readln(vaha); clrscr; b:=vyska*vyska; bmi:=vaha/b; writeln; writeln('Vyska: ',a:1:1); writeln('Vaha : ',vaha:1:1); writeln('------------------'); writeln('Vas BMI = ',bmi:2:1); writeln('------------------'); writeln('Klasifikacna tabulka :'); writeln; writeln('------------------------'); writeln('| BMI |KATEGORIA |'); writeln('|-----------|----------|'); writeln('| pod 18.5 |podvaha |'); writeln('|----------------------|'); writeln('|18.5 - 24.9|normal |'); writeln('|----------------------|'); writeln('|25.0 - 29.9|nadvaha |'); writeln('|----------------------|'); writeln('|30.0 - 34.9|obezita 1.|'); writeln('|----------------------|'); writeln('|35.0 - 39.9|obezita 2.|'); writeln('|----------------------|'); writeln('|40 a viac |obezita 3.|'); writeln('|----------------------|'); writeln; write('Verzia 1.0.4 (C) by Juraj Danis 2008'); readkey; end.