2013-10-15 3 views

ответ

0

Чтобы сложить два числа, вы можете сделать это:

let c = $a + $b 
echo $c 

Для чтения, вы можете сделать:

read -p "Enter the first number" a 
read -p "Enter the second number" b 
1
#!/bin/sh 
echo "enter the first number" 
read a 
echo "enter the seconf number" 
read b 
echo $(($a+$b)) 
+0

[Ссылка на документацию] (http://www.gnu.org/software/bash/manual/bashref.html#Arithmetic-Expansion) –

Смежные вопросы