arrays !!!
2 posters
arrays !!!
wat is the cmnd used to dynamically insert elements in an array???
Abhiramy- Posts : 9
Points : 21
Join date : 2010-02-26
to get and display array elements
this is an example for getting elements for an array dynamically and displaying it
echo "enter length"
read n
for (( i=0;i<n;i++ ))
do
read a[i]
done
echo "elemnts are:"
echo ${a[@]}
echo "enter length"
read n
for (( i=0;i<n;i++ ))
do
read a[i]
done
echo "elemnts are:"
echo ${a[@]}
aarthi- Posts : 12
Points : 22
Join date : 2010-02-26
Permissions in this forum:
You cannot reply to topics in this forum
|
|