Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- a=10
- b=5
- # Usando (( ))
- sum=$((a + b))
- diff=$((a - b))
- prod=$((a * b))
- quot=$((a / b))
- mod=$((a % b))
- echo "Suma: $sum"
- echo "Resta: $diff"
- echo "Multiplicación: $prod"
- echo "División: $quot"
- echo "Módulo: $mod"
- # Usando let
- let sum=a+b
- let diff=a-b
- let prod=a*b
- let quot=a/b
- let mod=a%b
- echo "Suma: $sum"
- echo "Resta: $diff"
- echo "Multiplicación: $prod"
- echo "División: $quot"
- echo "Módulo: $mod"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement