bash sum variable

C++
x = 2
y = 2

echo $((x + y))
Source

Also in C++: