Var A:string; C:array['0'..'9'] of integer; i:integer;BeginWrite('Введите натуральное число: ');ReadLn(A);For i:= 1 to Length(A) do if ('0'<=A[i])and(A[i]<='9') then C[A[i]]:=C[A[i]]+1;For i:= 1 to C['9'] do Write('9 ');For i:= 1 to C['6'] do Write('6 ');For i:= 1 to C['3'] do Write('3 ');WriteLn;For i:= 1 to C['0'] do Write('0 ');For i:= 1 to C['2'] do Write('2 ');For i:= 1 to C['4'] do Write('4 ');For i:= 1 to C['6'] do Write('6 ');For i:= 1 to C['8'] do Write('8 ');End.Введите натуральное число: 590125497036514097251903519027452109746510942510874980157948015748019748501974239 9 9 9 9 9 9 9 9 9 9 6 6 3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 4 4 4 4 4 4 4 4 4 4 6 6 8 8 8 8 8