Shell Program - Pattern 1

1
11
111
1111
11111

CODE: 

echo "enter number of lines:"
read n
for((i=1;i<=n;i++))
do
for((j=1;j<=i;j++))
do
    echo -ne "1"

done
echo " "
done

OUTPUT:
Shell Program - Pattern






No comments :

Post a Comment