Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- read num1
- read num2
- read op
- if [ $op -eq 1 ]
- then
- resultado=$(($num1 + $num2 ))
- echo "$resultado"
- elif [ $op -eq 2 ]
- then
- resultado=$(($num1 - $num2 ))
- echo "$resultado"
- else
- echo "Operação inválida!"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement