View Problem

Define a string containing variables and expressions

Given variables a=3 and b=4 output "3+4=7"
ExpandDiskEdit
groovy
println "$a+$b=${a+b}"
ExpandDiskEdit
groovy
printf "%d+%d=%d\n", a, b, a + b
ExpandDiskEdit
erlang
A = 3, B = 4,
io:format("~B+~B=~B~n", [A, B, (A+B)]).

Submit a new solution for groovy or erlang
There are 27 other solutions in additional languages (clojure, cpp, csharp, fantom ...)