Advertisement
joaopaulofcc

Untitled

Aug 11th, 2021
1,079
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.23 KB | None | 0 0
  1. read num1
  2. read num2
  3. read op
  4.  
  5. if [ $op -eq 1 ]
  6. then
  7.   resultado=$(($num1 + $num2 ))
  8.   echo "$resultado"
  9. elif [ $op -eq 2 ]
  10. then
  11.   resultado=$(($num1 - $num2 ))
  12.   echo "$resultado"
  13. else
  14.   echo "Operação inválida!"
  15. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement