07-25-2023, 09:38 AM
program SyntaxExample;
begin
// Variable declaration
var
age: Integer;
height: Double;
name: String;
// Input from user
WriteLn('Enter your name:');
ReadLn(name);
WriteLn('Enter your age:');
ReadLn(age);
WriteLn('Enter your height (in meters):');
ReadLn(height);
// Output to screen
WriteLn('Name:', name);
WriteLn('Age:', age);
WriteLn('Height:', height:0:2, 'm');
end.
begin
// Variable declaration
var
age: Integer;
height: Double;
name: String;
// Input from user
WriteLn('Enter your name:');
ReadLn(name);
WriteLn('Enter your age:');
ReadLn(age);
WriteLn('Enter your height (in meters):');
ReadLn(height);
// Output to screen
WriteLn('Name:', name);
WriteLn('Age:', age);
WriteLn('Height:', height:0:2, 'm');
end.