Write a shell script to find the sum and product of three numbers?



echo “enter 3 numbers”
read a
read b
read c
sum = `expr $a + $b + $c`
mul = `expr $a \* $b \* $c`
echo $ sum
echo $ mul

OUTPUT:
                                                    
enter 3 numbers
2       4         4
sum   10
mul    32

Comments

Popular posts from this blog

Write a program to add two number using inline function in C++?

Traversing of elements program with algorithm and Flowchart