Blame lazarus/console/expressions/expressions.lpr

ab6427
program expressions;
ab6427
ab6427
uses
ab6427
    SysUtils;
ab6427
ab6427
var
ab6427
  s: string;
ab6427
  a, b, c: single;
ab6427
  result: single;
ab6427
ab6427
begin
ab6427
  a := 10;
ab6427
  b := 15;
ab6427
  c := 20;
ab6427
ab6427
  result := (1/4)*sqrt((a+b+c)*(b+c-a)*(a+c-b)*(a+b-c));
ab6427
  Writeln('Area of triangle with'
ab6427
         + ' sides ' + FloatToStr(a)
ab6427
         + ', '      + FloatToStr(b)
ab6427
         + ' and '   + FloatToStr(c)
ab6427
         + ' is '    + FloatToStr(result) );
ab6427
ab6427
  result := (1/3)*pi*a*(b*b);
ab6427
  Writeln('Volume of cone with'
ab6427
         + ' height '     + FloatToStr(a)
ab6427
         + ' and radius ' + FloatToStr(b)
ab6427
         + ' is '         + FloatToStr(result) );
ab6427
ab6427
  result := (4/3)*pi*a*b*c;
ab6427
  Writeln('Volume of ellipsoid with'
ab6427
         + ' radiuses ' + FloatToStr(a)
ab6427
         + ', '         + FloatToStr(b)
ab6427
         + ' and '      + FloatToStr(b)
ab6427
         + ' is '       + FloatToStr(result) );
ab6427
ab6427
  Readln(s);
ab6427
end.