read "n" values

Hi
i need a shell script which can read n values and store in corresponding variables.

algorithm:
1)get total no of values from user eg : 3
2)read n inputs from user. In this case its 3
3)store the values read from user in variable
4)print it at the end of the script.

Sounds like homework. Can you show us what have you tried so far and where you are stuck?

Regards

#!/bin/ksh
echo "enter total"
read a
i=1
while [[ $i -le $a ]]
do
echo "Enter value $i"
read b
echo "the values is $b"
i=$(($i+1))
done

i want the values to be stored in individual variables and print at the end of the script

Use arrays, search with the Google Custom Search right above this page for ksh arrays and you'll find a bunch of threads regarding this topic.

Regards