To display 1 or 2 space bar output

Dear Experts,

Please help to advice me for the command to show the output below:-
1) If i input 3, 201, 222 then the output should show 1 space bar as below
201 222
2) If i input 4, 201, 1509 then the outpur should show 2 span bar as below
201 1509

3 will be for 1 space bar between 201 and 222
4 will be for 2 space bar between 201 and 1509

Here below is my script but it cannot work. Please help correct

echo "Please enter the number of digit BTS-ID"
read digit 
echo "Please enter MM#"
read mm
echo "Please enter BTS#"
read bts 

if ["digit" = 3]
  then
    echo "$mm  $bts" > mmbts
    exit 0

  else
    echo "$mm $bts" > mmbts
fi

not tested.....

#!/bin/ksh

typeset -i digit, mm, bts

echo "Please enter the number of digit BTS-ID"
read digit
echo "Please enter MM#"
read mm
echo "Please enter BTS#"
read bts

if (( digit == 3 ))
then
  echo "$mm $bts" > mmbts
else
  echo "$mm $bts" > mmbts
fi

You don't need to enter the length of a variable. You can find it with #. And you can typeset a variable so it is always at least 4 characters...spaces added as needed.

#! /usr/bin/ksh

typeset -R4 rbts
echo "Please enter MM#"
read mm
echo "Please enter BTS#"
read bts

echo bts is $bts which has ${#bts} digits
rbts=$bts
echo "$mm $rbts"
exit 0