Pascal function that returns a power of 10

function pow10(exponent:byte):longint;
var  p:longint; {this is the number where we will store the result}
     i:byte;
begin
 p := 1;
 for i := 2 to exponent do
  begin
   p := p * 10;
  end;
 pow10 := p;
end;

Leave a Reply

Your email address will not be published. Required fields are marked *

three × 4 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.