DrSchool Learn coding, fast.
EN AR BN CS DE EL Search

Numbers — Example 30

Quick explanation + ready code for: Numbers.

Shell Numbers Back to examples
Back to language
Syntax: Numbers in Shell. ID: #30

Code

a=2; b=3
echo $((a+b))
echo $((a*b))

Notes

You can copy this snippet and adapt it. For advanced, add real-world inputs, edge cases, and tests.