DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR SHELL
bc add
a
=
1.25
b
=
3.49
sum
=
$(
echo
"scale=2; "
$a
"+"
$b
|
bc
-l
)
#scale defines number of decimals
4.74
PREVIOUS
NEXT
Tagged:
#bc
#add
ADD COMMENT
Topic
COMMENT
Name
1+2 =
Submit