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

 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.

Posted Date: 9/26/2012 4:23:40 AM | Location : United States







Related Discussions:- Write a shell script to find the maximum of three numbers, Assignment Help, Ask Question on Write a shell script to find the maximum of three numbers, Get Answer, Expert's Help, Write a shell script to find the maximum of three numbers Discussions

Write discussion on Write a shell script to find the maximum of three numbers
Your posts are moderated
Related Questions
I have constantly been emailing to get the task i had paid for to be done correctly but no replies from anyone. Not even one acknowledging my emails. Been phoning all the way from

Introduction This assignment builds on your application, produced in Assignment 1, which holds a list of cabins, which can be either read in from a text file or just hard coded

A hardware store sells the following hardware tools: screwdriver, wrench, and tape measure. You are asked to calculate the profit for the store based on the number of tools sold an

I need help I want to implement the Genetic Algorithm for Shortest path Kindly Help me I will be thankful to you

LALR Parser: Rule Table - Contains definitions of production rules within the grammar. Attributes: Count - Number of production rules in the table Child items:

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

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

looking for help with a flash game assignment.

My kinect hand cursor only works for main menu but when it goes to another page it wouldn''t work.. especially when there is for camera feed

Introduction A search engine (like Google) has three main components: a crawler that finds and stores copies of files on the web, an indexer that creates a data structure that