pascal cheat sheet for programmers
if condition then begin statement(s) end;
if condition then statement;
3.67
3
while condition do begin statement(s) end;
while condition do statement;
Thank you!
3
0
4.14
7
repeat statement(s) until condition;
Thank you!
7
0
4
1
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.
Thank you!
1
0
4.4
5
with variable do begin statement(s) end;
with variable do statement;
Thank you!
5
0
Are there any code examples left?
New code examples in category Pascal
-
Pascal 2022-03-04 02:30:03 pascal special characters
-
Pascal 2022-01-31 12:07:02 comment in pascal
-
Pascal 2021-11-17 05:12:13 pascal comments
-
Pascal 2021-11-17 00:52:17 pascal modifiers
-
Pascal 2021-11-05 05:21:10 pascal cheat sheet pdf
-
Pascal 2021-10-01 16:03:02 comments in pascal
-
Pascal 2021-09-29 20:08:02 Kth Row Of Pascal's Triangle
-
Pascal 2021-09-25 01:34:04 program to print pascal triangle
-
Pascal 2021-09-20 13:21:06 pascal online compiler