Write a shell script to find the maximum of three numbers, Programming Languages

Assignment Help:

 W.A.S.S to find the maximum of three numbers

Program

# W.A.S.S to find the maximum of three numbers


echo "Enter three No.:"
read no1
read no2
read no3

if test $no1 -gt $no2                    # -gt is stands for greater than
then
if test $no1 -gt $no3                    # Return a status of 0 (True) or 1 (False) depending on the
                                                  # evaluation  of the conditional expression exp
then
echo "$no1 is  Max of three nos."
else
echo "$no3 is Max of three nos."
fi                           # fi is the end of if..else block
else
if test $no2 -gt $no3
then
echo "$no2 is Max of three nos."
else
echo "$no3 is Max of three nos."
fi
fi

Output

Enter three No.:
10
15
12
15 is Max of three nos.


Related Discussions:- Write a shell script to find the maximum of three numbers

Unix help, need a command to : Display user id, first and last names of all...

need a command to : Display user id, first and last names of all the students the class specified by the prefix in alphabetical order by last name from /etc/passwd

New features of visual studio 2008, New Features of Visual Studio 2008 1. L...

New Features of Visual Studio 2008 1. LINQ Support LINQ primarily is the structure of many conventional question employees that allow you to perform with information in a more user

Pascal, Problem Solving 1. Write Pascal code that accepts as input the nam...

Problem Solving 1. Write Pascal code that accepts as input the names of the students, course work score and exam score for a unspecified number of students who have taken a subjec

Write a shell script to find the factorial of a given number, W.A.S.S to fi...

W.A.S.S to find the factorial of a given number. Program # W.A.S.S to find the factorial of a given number.    echo -e "enter number:\c"            #  \c Suppress trailing n

Java packages, Expertsmind brings you unique solution in java assignments ...

Expertsmind brings you unique solution in java assignments Packages A Java packages is a process for planning Java sessions into namespaces just like the segments of Modu

Unix Shell, #quFollow the my shell programming guidelines as in the other a...

#quFollow the my shell programming guidelines as in the other assignments. Write a shell script to send a customized mail message to the users listed on the command line by login (

Create single page to demonstrates an xhtml form, Create a single page that...

Create a single page that demonstrates an XHTML form. The form should include all the fields you feel are necessary for submitting an order of books and must include at least one

Count no of files, Normal 0 false false false EN-US X...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Describe the hypermedia and hypertext, Question: (a) How does HTML all...

Question: (a) How does HTML allow you to: (i) turn an image into a clickable hyperlink? Include code to switch off the default border (ii) convert the above hyperlink i

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd