Login
|
Signup
langref.org
-
fsharp
and
fantom
add..
all
clojure
cpp
csharp
erlang
go
groovy
haskell
java
ocaml
perl
php
python
ruby
scala
Home
All
Solved
Unsolved
Strings
Numbers
Regex
Lists
Maps
Structure
Files
Dates
OOP
Networking
XML
Algorithms
Misc
Parallel
View Problem
Strings
Declaration
Define a string containing variables and expressions
Given variables a=3 and b=4 output
"3+4=7"
fsharp
let a, b = 3, 4
let mystr = sprintf "%d+%d=%d" a b (a+b)
printfn "%s" mystr
#light
let a, b = 3, 4
let mystr = sprintf "%d+%d=%d" a b (a+b)
printfn "%s" mystr
fantom
echo("$a+$b=${a+b}")
class SolutionXX
{
static Void main()
{
echo("$a+$b=${a+b}")
}
}
Submit a new solution for
fsharp
or
fantom
There are 28 other solutions in
additional
languages (
clojure
,
cpp
,
csharp
,
erlang
...)