marcus2vinicius

Function 01PASCAL

Sep 13th, 2011
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.35 KB | None | 0 0
  1. Program Fun01 ;
  2. var
  3.  n:integer;
  4.  
  5. function teste(n:integer):integer;
  6. var
  7.  res:integer;
  8. Begin
  9.  if (n > 0) then
  10.    res:=1
  11.  else res:=0;
  12.  teste:= res;
  13. End;  
  14.  
  15.  Begin
  16.   Write('Informe Um Valor: ');
  17.   readln(n);
  18.   Writeln('Resultado: ',teste(n));
  19.  
  20.  Writeln('            by Marcus Vinicius');
  21.  End.
Advertisement
Add Comment
Please, Sign In to add comment