Breaking News
You are here: Home / Program Code / UNIX / write a script to enter the number & find the largest number from it

write a script to enter the number & find the largest number from it

$vi largest.sh

        echo -e "\n enter number :\c"
        read no

large=0

while [ $no -ne 0 ]
do

        if [ $no -gt $large ]
        then
                large=$no
        fi

        echo -e "\n enter number :\c"
        read no

done

echo -e "\n The largest number is : $large"

:wq

Download Paper Solutions from Below Link

About admin

Scroll To Top