Scripts

write a script that ask the for for the user to input two
numbers and outs the sum, product, and difference f those number

the sum of X and Y is Z
the product of X and Y is Z
the difference of X and Y is Z

where x and Y are the number of input and Z is the result

I am bad at math please help

Whoa, hold on now. This is definitely homework! You've copied down the question verbatim!

I'd suggest asking your tutor for help from now on.

You could also enrol in a maths class (sum is +, product is *, difference is -). Sheesh.

Cheers
ZB

echo "Input x:"
read x

echo "Input y:"
read y

((z=x+y))

echo " sum of $x and $y is $z"

((z=x-y))
echo " difference of $x and $y is $z"

((z=x*y))
echo "product of $x and $y is $z"

((z=x/y))
echo "division of $x by $y is $z"

LOL... thanx... U are very helpfull... :stuck_out_tongue:

Lito - I suggest you start by reading the RULES

All Forum members - note that this IS a student.