We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Linux Shell
- Bash
- The World of Numbers
- Discussions
The World of Numbers
The World of Numbers
+ 0 comments #!/bin/bash read x; read y; soma=`expr $x + $y`; echo $soma; diferenca=`expr $x - $y`; echo $diferenca; produto=`expr $x \* $y`; echo $produto; divisao=`expr $x / $y`; echo $divisao;
+ 0 comments #!/bin/bash read n1 read n2 echo $[n1 + n2] echo $[n1 - n2] echo $[n1 * n2] echo $[n1 / n2]
+ 0 comments Does anybody know why this version of code fails with error in this console...
x=10 y=11 echo `expr "$x" "/" "$y"` expr "$x" "/" "$y"
while this one works like a charm?
x=10 y=11 expr "$x" "/" "$y" echo `expr "$x" "/" "$y"`
+ 0 comments Here are the solution of The World of Numbers HackerRank Solution https://www.chase2learn.com/the-world-of-numbers-hackerrank-solution/
+ 0 comments read a read b echo -e "$(($a+$b))\n$(($a-$b))\n$(($a*$b))\n$(($a/$b))"
Load more conversations
Sort 150 Discussions, By:
Please Login in order to post a comment