Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Shell Script
- # Dizajnimi i nje kalkulatori
- echo " Jepe numrin a: "
- read a
- echo " Jepe numrin b: "
- read b
- echo -e " 1. Mbledhja\n2. Zbritja\n3. Shumezimi\n4. Pjestimi"
- echo " Zgjidhe opsionin: "
- read opsioni
- case $opsioni in
- 1) c=`expr "scale=3;$a + $b" | bc`;;
- 2) c=`expr "scale=3;$a - $b" | bc`;;
- 3) c=`expr "scale=3;$a * $b" | bc`;;
- 4) c=`expr "scale=3;$a / $b" | bc`;;
- *) echo " Zgjidhje te gabuar. "
- exit 0;;
- esac
- echo " Rezulati = $c "
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement