Write a procedure in the Pascal ABC program that displays in a column all the digits

Write a procedure in the Pascal ABC program that displays in a column all the digits of the number passed to it, starting with the first. Example: 1234 1 2 3 4

program zz1;
var a: integer; // set variables of integer type

procedure sr (n: integer);
var k, m: integer;
begin
k: = n mod 10; n: = n div 10;
while n <> 0 do
begin
k: = k * 10 + n mod 10;
n: = n div 10;
end;
while k <> 0 do
begin
m: = k mod 10;
writeln (m);
k: = k div 10;
end;
end;
begin
write (‘enter number a’); // enter a number from the keyboard
read (a);
sr (a); // call the procedure
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.