Logo

Programming-Idioms

New implementation

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating resource.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
string input = Console.ReadLine();
string[] intlist = input.Split(new char[] {',', ' '});
	
foreach(string item in intlist)
{
  Console.WriteLine(Convert.ToInt32(item));
}
import std.stdio;
import std.conv : to;
import std.algorithm.iteration : map;
auto list = stdin.byLine.map!(a => a.to!int);
integer :: I,j,k ,l(3)
read(*,*) I, j, k, l
import (
	"bufio"
	"os"
	"strconv"
)
var ints []int
s := bufio.NewScanner(os.Stdin)
s.Split(bufio.ScanWords)
for s.Scan() {
	i, err := strconv.Atoi(s.Text())
	if err == nil {
		ints = append(ints, i)
	}
}
if err := s.Err(); err != nil {
	return err
}
read <$> getLine :: IO [Integer]

-- reading space separated list of ints
map read . words <$> getLine :: IO [Int]
process.stdin.on('data', processLine)

function processLine (line) {
  const string = line + ''
  console.log(string)
}
(read)
fgl
type
  TFloatList = specialize TFPGList<Double>;
var
  List: TFloatList;
  D: Double;

begin
  List := TFloatList.Create;
  while not Eof do
  begin
    Read(D);
    List.Add(D);
  end;
  List.Free;
end.
@x = map {chomp; $_} <>;
list(map(int, input().split())
numbers = [int(x) for x in input().split()]
STDIN.read.split.map(&:to_i)