If N > 9 Then Begin Vs := N; St := 1; While Vs > 9 Do Begin St := St * 10 Vs := Vs Div 10 End; N := M Mod St Div 10 * 10 + N Mod 10 * St + Vs End: