Breaking News
You are here: Home / Program Code / UNIX / write a script to display the following pattern2

write a script to display the following pattern2

4 3 2 1

3 2 1

2 1

1

$vi pattern3.sh

echo -e "n Enter number :c"
read no

i=$no

while [ $i -ge 1 ]
do
    j=$i

        while [ $j -ge 1 ]
        do

                echo -e "$j c"
                j=`expr $j - 1`

        done

        echo  " "

        i=`expr $i - 1`

done

:wq

Download Paper Solutions from Below Link

About admin

Scroll To Top