GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — simple-bash-scripts/scripts/simplecalc.sh at master · ruanyf/simple-bash-scripts Expand file tree/ Copy pathsimplecalc.shMore file actions executable file ·41 lines (40 loc) · 584 Bytes / Copy pathsimplecalc.shFile metadata and controlsexecutable file ·41 lines (40 loc) · 584 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 #! /bin/bash clear sum=0 i="y" echo " Enter one no." read n1 echo "Enter second no." read n2 while [ $i = "y" ]; do echo "1.Addition" echo "2.Subtraction" echo "3.Multiplication" echo "4.Division" echo "Enter your choice" read ch case $ch in 1) sum=$(expr $n1 + $n2) echo "Sum ="$sum ;; 2) sum=$(expr $n1 - $n2) echo "Sub = "$sum ;; 3) sum=$(expr $n1 \* $n2) echo "Mul = "$sum ;; 4) sum=$(expr $n1 / $n2) echo "Div = "$sum ;; *) echo "Invalid choice" ;; esac echo "Do u want to continue (y/n)) ?" read i if [ $i != "y" ]; then exit fi done |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |