So far I was able to figure out a little bit and it seems to work.
I think.
I'm still unsure of how to find the average of 10 numbers and not sure if I'm doing this correctly. I want to be able to play around with the while loop and if statements so I'll be able to write a script that reads 10 numbers and can find a max, min and average. Any advice would be appreciated. I'm terrible with math
so this is making things even harder for me.
Here is what I have so far.
ksh-2.04$ cat>maximum
echo "Enter 2 Numbers Below to Find Which One is The Maximum Number: "
read num1 num2
if [ $num1 -gt $num2 ]
then
echo "Number1: $num1 is the Maximum"
else
echo "Number2: $num2 is the Maximum"
fi
exit
ksh-2.04$ sh maximum
Enter 2 Numbers Below to Find Which One is The Maximum Number:
32
Number2: is the Maximum
ksh-2.04$
Thanks
Lanboy_2005