Read Variables
 


program Read_Some_Variables;

var Index : byte;
Number1,Number2,Number3 : integer;

begin (* main program *)
Writeln('This is the ''Read'' portion of the program');
for Index := 1 to 5 do begin
Write('Enter up to three integers ');
Read(Number1,Number2,Number3);
Writeln('Thank you');
Writeln('The numbers entered were ',Number1:6,Number2:6,
Number3:6);
end;

Writeln;
Writeln('This is the ''Readln'' portion of the program');
for Index := 1 to 5 do begin
Write('Enter up to three integers ');
Readln(Number1,Number2,Number3);
Writeln('Thank you');
Writeln('The numbers entered were ',Number1:6,Number2:6,
Number3:6);
end;
end. (* of main program *)


Result of execution

(The results are dependent on the data entered at the keyboard)

(c) Shilpa Sayura Foundation 2006-2017