Saturday 13 July 2013

~programming: BMI calculator~

assalamualaikum,
malam ni,
ana dah berjaya compile kan program utk kire BMI ntum sume,


so, ni ana sertakan copy coding utk korang tampal kat dev pascal, 
selamat mencube yepp....


program
bmicalculator;

var
weight,height,BMI:real;

begin
writeln('what is your weight in KG?');
readln(weight);
writeln();
writeln('what is your height in m?');
readln(height);
writeln();
BMI:=weight/(height*height)  ;

if (BMI<18) then
writeln('you are underweight')
else if (BMI<18.5) then
writeln('you are thin for your height')
else if (BMI>=18.6) and (BMI<=24.9) then
writeln ('you are at healthy weight')

else
begin
writeln('you are obesity') ;
writeln('PLEASE MEET DOCTOR!')     ;
end;

readln;

end.


~selamat mencubaaaa (happy pasai sy punye BMI, normal ohh)~

No comments:

Post a Comment