Answers for "pascal cheat sheet for programmers"

0

pascal cheat sheet for programmers

with variable do begin statement(s) end;
with variable do statement;
Posted by: Guest on January-14-2021
0

pascal cheat sheet for programmers

if condition then begin statement(s) end;
if condition then statement;
Posted by: Guest on January-14-2021
0

pascal cheat sheet for programmers

repeat statement(s) until condition;
Posted by: Guest on January-14-2021
0

pascal cheat sheet for programmers

while condition do begin statement(s) end;
while condition do statement;
Posted by: Guest on January-14-2021
0

pascal cheat sheet for programmers

program Addition;

// Link the SysUtils file for access to file handling routines
uses
  SysUtils;

// Declare some variables
var
  LIn, LOut: Text;         // References to the input and output files
  LVar1, LVar2: integer;   // The two values that are to be added together
  LResult: integer;        // The result

begin

  // Open the input file
  Assign(LIn, 'addin.txt');
  Reset(LIn);

  // Read the input values
  ReadLn(LIn, LVar1, LVar2);

  // Open the output file
  Assign(LOut, 'addout.txt');
  ReWrite(LOut);

  // Calculate the result
  LResult:= LVar1 + LVar2;

  // Write to output file
  WriteLn(LOut, LResult);

  // Cleanup
  CloseFile(LIn);
  CloseFile(LOut);

end.
Posted by: Guest on January-14-2021

Browse Popular Code Answers by Language