Help regarding a bash menu script

Greetings all,
I'm having some trouble writing a menu drive bash script, actually coding the menu part was not difficult however its a problem with a menu option I'm having trouble with.
My menu has 5 options, when the user selects the second option, they are then prompted to enter a number from 1-9 and depending on what number they entered the following output should be displayed

1
12
123
1234

i.e. they entered 4

now this seems like this should really not be that hard, but for the life of me can't figure it out...what I have so far is:::

#!/bin/bash
echo
echo "***********************"
echo "***********************"
echo
declare stop=0
while [ $stop == 0 ]; do
cat <<ENDOFMENU
1       : the first option
2       : the second option
3       : the third option
4       : the fourth option
5       : the fifth option
ENDOFMENU

echo
echo -n " Your choice? : "
read choice

...

case $choice in
  2)    echo -n " Now please enter a number 1-9 : "
        read number
        declare i=1
        while (( $i  <= $number )); do
                declare j=1
                while (( $j <= $number )); do
                        echo $j
                        printf $j + 1
                        (( j++ ))
                done
        (( i++))
        done

        declare stop=1
;;

which outputs:::

1
12
23
34
41
12
23
34
41
12
23
34
41
12
23
34
4

Any help would be much appreciated.

Here is how you can do it in ksh:

#!/usr/bin/ksh

echo -n " Now please enter a number 1-9 : "
read number
i=$number
while (( $i > 0 )); do

  j=$(( $number - $i + 1 ))
  k=1

  while (( $k <= $j )); do
    print -n "$k"
    k=$(( $k + 1 ))
  done

  print ""

  i=$(( $i - 1 ))

done

Homework?

The logic of your loop has something wrong.
A revisited version

# case $choice in
# 2)   
        echo -n " Now please enter a number 1-9 : "
        read number
        for ((i=1; i<=number; i++ ))
        do    OUT=""
            for ((j=1; j<=$i; j++))
            do    OUT+=$j
            done
            echo $OUT
        done
# ;;

Thanks for your help.
And yes it was homework, I see now it should have been in the Homework section, sorry it was my first post, all apologies.

It's not like it isn't stated in the Rules how to post homework...