Jump to content

A+B: Difference between revisions

399 bytes added ,  14 years ago
no edit summary
({{header|F_sharp|F#}} added f#)
No edit summary
Line 164:
main = getLine >>= (\xs -> print $ sum' xs)</lang>
 
=={{header|Icon and Unicon}}==
 
==={{header|Icon}}===
<lang icon>procedure main()
numChars := '-'++&digits
read() ? {
A := (tab(upto(numChars)), integer(tab(many(numChars))))
B := (tab(upto(numChars)), integer(tab(many(numChars))))
}
write((\A + \B) | "Bad input")
end</lang>
 
==={{header|Unicon}}===
 
The Icon solution also works in Unicon.
=={{header|Java}}==
<lang java>import java.util.*;
Cookies help us deliver our services. By using our services, you agree to our use of cookies.