Professional Documents
Culture Documents
sum=$((a+b))
echo "Sum+ $sum"
dif=$((a-b))
echo "Diff^Z
[8]+ Stopped cat > math.sh
VIT-CC3-11:Aaditi student$ cat>math.sh
read -p "Enter 1st no.: " a
read -p "Enter 2nd no.: " b
sum=$((a+b))
echo "Sum= $sum"
dif=$((a-b))
echo "Diff= $dif"
mul+$((a*b))
vi math.sh
i
^Z
[9]+ Stopped cat > math.sh
VIT-CC3-11:Aaditi student$ vi math.sh
VIT-CC3-11:Aaditi student$ ./math.sh
Enter 1st no.: 40
Enter 2nd no.: 4
Sum= 44
Diff= 36
Mult= 160
Div= 10
VIT-CC3-11:Aaditi student$ cat>SI.sh
^Z
[10]+ Stopped cat > SI.sh
VIT-CC3-11:Aaditi student$ vi SI.sh
VIT-CC3-11:Aaditi student$ chmod 777 SI.sh
VIT-CC3-11:Aaditi student$ ./SI.sh
Enter Principle amount: 100000
Enter No. of year: 5
Enter Rate of intrest: 12.5
./SI.sh: line 4: (100000*5*12.5)/100: syntax error: invalid arithmetic operator (error token is ".5)/100")
Simple Intrest:
VIT-CC3-11:Aaditi student$ ./SI.sh
Enter Principle amount: 100000
Enter No. of year: 5
Enter Rate of intrest: 12
Simple Intrest: 60000
VIT-CC3-11:Aaditi student$